Removed (pretty inconsistently used) tab chars from source code base.
This commit is contained in:
@@ -10,83 +10,83 @@
|
||||
; unsigned char get_ostype (void);
|
||||
; unsigned char get_tv (void);
|
||||
|
||||
.export _get_ostype
|
||||
.export _get_tv
|
||||
.importzp tmp1
|
||||
.export _get_ostype
|
||||
.export _get_tv
|
||||
.importzp tmp1
|
||||
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "geossym2.inc"
|
||||
.include "const.inc"
|
||||
.include "geossym.inc"
|
||||
.include "geossym2.inc"
|
||||
|
||||
_get_ostype:
|
||||
ldx #0
|
||||
lda version
|
||||
cmp #$a9
|
||||
beq geos11
|
||||
and #%11110000
|
||||
cmp #$10
|
||||
beq geos10
|
||||
lda c128Flag ; we're on at least 2.0
|
||||
cmp #$18
|
||||
beq geos_on_plus4
|
||||
ora version
|
||||
rts
|
||||
ldx #0
|
||||
lda version
|
||||
cmp #$a9
|
||||
beq geos11
|
||||
and #%11110000
|
||||
cmp #$10
|
||||
beq geos10
|
||||
lda c128Flag ; we're on at least 2.0
|
||||
cmp #$18
|
||||
beq geos_on_plus4
|
||||
ora version
|
||||
rts
|
||||
geos10:
|
||||
lda version
|
||||
rts
|
||||
lda version
|
||||
rts
|
||||
geos11:
|
||||
lda #$11
|
||||
rts
|
||||
lda #$11
|
||||
rts
|
||||
geos_on_plus4:
|
||||
lda #$04
|
||||
rts
|
||||
lda #$04
|
||||
rts
|
||||
|
||||
_get_tv:
|
||||
jsr _get_ostype
|
||||
cmp #$04
|
||||
beq plus4_get_tv
|
||||
bpl only40 ; C64 with 40 columns only
|
||||
lda graphMode
|
||||
bpl only40 ; C128 but currently on 40 columns
|
||||
ldx #1 ; COLUMNS80
|
||||
bne tvmode
|
||||
only40: ldx #0 ; COLUMNS40
|
||||
tvmode: ; PAL/NTSC check here, result in A
|
||||
jsr _get_ostype
|
||||
cmp #$04
|
||||
beq plus4_get_tv
|
||||
bpl only40 ; C64 with 40 columns only
|
||||
lda graphMode
|
||||
bpl only40 ; C128 but currently on 40 columns
|
||||
ldx #1 ; COLUMNS80
|
||||
bne tvmode
|
||||
only40: ldx #0 ; COLUMNS40
|
||||
tvmode: ; PAL/NTSC check here, result in A
|
||||
php
|
||||
sei ; disable interrupts
|
||||
lda CPU_DATA ; this is for C64
|
||||
pha
|
||||
lda #IO_IN ; enable access to I/O
|
||||
sta CPU_DATA
|
||||
bit rasreg
|
||||
bpl tvmode ; wait for rasterline 127<x<256
|
||||
lda #24 ; (rasterline now >=256!)
|
||||
sei ; disable interrupts
|
||||
lda CPU_DATA ; this is for C64
|
||||
pha
|
||||
lda #IO_IN ; enable access to I/O
|
||||
sta CPU_DATA
|
||||
bit rasreg
|
||||
bpl tvmode ; wait for rasterline 127<x<256
|
||||
lda #24 ; (rasterline now >=256!)
|
||||
modelp:
|
||||
cmp rasreg ; wait for rasterline = 24 (or 280 on PAL)
|
||||
bne modelp
|
||||
lda grcntrl1 ; 24 or 280 ?
|
||||
bpl ntsc
|
||||
lda #0 ; PAL
|
||||
beq modeend
|
||||
cmp rasreg ; wait for rasterline = 24 (or 280 on PAL)
|
||||
bne modelp
|
||||
lda grcntrl1 ; 24 or 280 ?
|
||||
bpl ntsc
|
||||
lda #0 ; PAL
|
||||
beq modeend
|
||||
ntsc:
|
||||
lda #$80 ; NTSC
|
||||
lda #$80 ; NTSC
|
||||
|
||||
modeend:
|
||||
stx tmp1
|
||||
ora tmp1
|
||||
sta tmp1
|
||||
ldx #0
|
||||
pla
|
||||
sta CPU_DATA ; restore memory config
|
||||
plp ; restore interrupt state
|
||||
lda tmp1
|
||||
rts
|
||||
stx tmp1
|
||||
ora tmp1
|
||||
sta tmp1
|
||||
ldx #0
|
||||
pla
|
||||
sta CPU_DATA ; restore memory config
|
||||
plp ; restore interrupt state
|
||||
lda tmp1
|
||||
rts
|
||||
plus4_get_tv:
|
||||
ldx #1 ; Assume PAL
|
||||
bit $FF07 ; Test bit 6
|
||||
bvc plus4pal
|
||||
dex ; NTSC
|
||||
ldx #1 ; Assume PAL
|
||||
bit $FF07 ; Test bit 6
|
||||
bvc plus4pal
|
||||
dex ; NTSC
|
||||
plus4pal:
|
||||
txa
|
||||
ldx #0
|
||||
rts
|
||||
txa
|
||||
ldx #0
|
||||
rts
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
|
||||
; int GetSerialNumber (void);
|
||||
|
||||
.export _GetSerialNumber
|
||||
.export _GetSerialNumber
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
.include "jumptab.inc"
|
||||
.include "geossym.inc"
|
||||
|
||||
_GetSerialNumber:
|
||||
jsr GetSerialNumber
|
||||
lda r0L
|
||||
ldx r0H
|
||||
rts
|
||||
jsr GetSerialNumber
|
||||
lda r0L
|
||||
ldx r0H
|
||||
rts
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
; void InitForIO (void);
|
||||
; void DoneWithIO (void);
|
||||
|
||||
.export _InitForIO, _DoneWithIO
|
||||
.export _InitForIO, _DoneWithIO
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_InitForIO = InitForIO
|
||||
|
||||
_DoneWithIO = DoneWithIO
|
||||
_InitForIO = InitForIO
|
||||
|
||||
_DoneWithIO = DoneWithIO
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
; void SetDevice (char newDeviceNumber);
|
||||
|
||||
.export _SetDevice
|
||||
.export _SetDevice
|
||||
|
||||
.include "jumptab.inc"
|
||||
|
||||
_SetDevice = SetDevice
|
||||
.include "jumptab.inc"
|
||||
|
||||
_SetDevice = SetDevice
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
; void ToBASIC (void);
|
||||
|
||||
.export _ToBASIC
|
||||
.export _ToBASIC
|
||||
|
||||
.include "jumptab.inc"
|
||||
.include "jumptab.inc"
|
||||
|
||||
_ToBASIC = ToBASIC
|
||||
_ToBASIC = ToBASIC
|
||||
Reference in New Issue
Block a user