remove a bunch of TABs

This commit is contained in:
mrdudz
2022-04-16 18:16:14 +02:00
parent 3dd9ed0414
commit 2eb20b3e8a
10 changed files with 182 additions and 182 deletions

View File

@@ -9,12 +9,12 @@
.constructor init_clock .constructor init_clock
.import sreg: zp .import sreg: zp
.import _zonecounter .import _zonecounter
.include "atari7800.inc" .include "atari7800.inc"
.macpack generic .macpack generic
.code .code
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; Read the clock counter. ; Read the clock counter.
@@ -38,9 +38,9 @@
; _zonecounter == 1 (from 1st visible scanline to last visible scanline) ; _zonecounter == 1 (from 1st visible scanline to last visible scanline)
; ;
update_clock: update_clock:
lda _zonecounter lda _zonecounter
and #01 and #01
beq @L1 beq @L1
inc clock_count inc clock_count
bne @L1 bne @L1
inc clock_count+1 inc clock_count+1
@@ -54,10 +54,10 @@ update_clock:
; ;
.segment "ONCE" .segment "ONCE"
init_clock: init_clock:
lda #0 lda #0
sta clock_count+2 sta clock_count+2
sta clock_count+1 sta clock_count+1
sta clock_count sta clock_count
rts rts
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------

View File

@@ -7,12 +7,12 @@
.export __clocks_per_sec .export __clocks_per_sec
.import sreg: zp .import sreg: zp
.import _paldetected .import _paldetected
.include "atari7800.inc" .include "atari7800.inc"
.macpack generic .macpack generic
.code .code
;----------------------------------------------------------------------------- ;-----------------------------------------------------------------------------
; Return the number of clock ticks in one second. ; Return the number of clock ticks in one second.
@@ -20,15 +20,15 @@
.proc __clocks_per_sec .proc __clocks_per_sec
lda #0 lda #0
tax tax
sta sreg ; return 32 bits sta sreg ; return 32 bits
sta sreg+1 sta sreg+1
lda _paldetected lda _paldetected
bne pal bne pal
lda #60 ; NTSC - 60Hz lda #60 ; NTSC - 60Hz
rts rts
pal: pal:
lda #50 ; PAL - 50Hz lda #50 ; PAL - 50Hz
rts rts
.endproc .endproc

View File

@@ -1,14 +1,14 @@
.export _zonecounter .export _zonecounter
.export __STARTUP__ : absolute = 1 .export __STARTUP__ : absolute = 1
.export _exit .export _exit
.import __ROM_START__ .import __ROM_START__
.import __RAM3_START__, __RAM3_SIZE__ .import __RAM3_START__, __RAM3_SIZE__
.import initlib, donelib .import initlib, donelib
.import zerobss, copydata .import zerobss, copydata
.import IRQStub .import IRQStub
.import push0, _main .import push0, _main
.include "atari7800.inc" .include "atari7800.inc"
.include "zeropage.inc" .include "zeropage.inc"
INPTCTRL = $01 INPTCTRL = $01
@@ -50,7 +50,7 @@ _exit:
NMIHandler: NMIHandler:
inc _zonecounter inc _zonecounter
jmp IRQStub jmp IRQStub
IRQHandler: IRQHandler:
rti rti

View File

@@ -4,15 +4,15 @@
; This header contains data for emulators ; This header contains data for emulators
; ;
.export __EXEHDR__: absolute = 1 .export __EXEHDR__: absolute = 1
.import __CARTSIZE__ .import __CARTSIZE__
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; EXE header ; EXE header
.segment "EXEHDR" .segment "EXEHDR"
.byte 3 ; version .byte 3 ; version
.byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' ' .byte 'A','T','A','R','I','7','8','0','0',' ',' ',' ',' ',' ',' ',' '
.byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0 .byte 'G','a','m','e',' ','n','a','m','e',0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,>__CARTSIZE__,0 ; Set the cart size in the cfg file .byte 0,0,>__CARTSIZE__,0 ; Set the cart size in the cfg file
; bit 0 - pokey at 4000 ; bit 0 - pokey at 4000
; bit 1 - supergame bank switched ; bit 1 - supergame bank switched
; bit 2 - supergame ram at $4000 ; bit 2 - supergame ram at $4000
@@ -28,19 +28,19 @@
; bit 12 - souper ; bit 12 - souper
; bit 13-15 - Special ; bit 13-15 - Special
; 0 = Normal cart ; 0 = Normal cart
.byte 0,0 ; 0 = Normal cart .byte 0,0 ; 0 = Normal cart
.byte 1 ; 1 = Joystick, 2 = lightgun .byte 1 ; 1 = Joystick, 2 = lightgun
.byte 0 ; No joystick 2 .byte 0 ; No joystick 2
.byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite .byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite
.byte 0 ; Save data peripheral - 1 byte (version 2) .byte 0 ; Save data peripheral - 1 byte (version 2)
; 0 = None / unknown (default) ; 0 = None / unknown (default)
; 1 = High Score Cart (HSC) ; 1 = High Score Cart (HSC)
; 2 = SaveKey ; 2 = SaveKey
.byte 0 ; 63 Expansion module .byte 0 ; 63 Expansion module
; 0 = No expansion module (default on all currently released games) ; 0 = No expansion module (default on all currently released games)
; 1 = Expansion module required ; 1 = Expansion module required
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0
.byte 'A','C','T','U','A','L',' ','C','A','R','T',' ','D','A','T','A',' ','S','T','A','R','T','S',' ','H','E','R','E' .byte 'A','C','T','U','A','L',' ','C','A','R','T',' ','D','A','T','A',' ','S','T','A','R','T','S',' ','H','E','R','E'

View File

@@ -3,63 +3,63 @@
; ;
; unsigned char get_tv (void) ; unsigned char get_tv (void)
; ;
.include "atari7800.inc" .include "atari7800.inc"
.include "get_tv.inc" .include "get_tv.inc"
.export _get_tv .export _get_tv
.export _paldetected .export _paldetected
.segment "DATA" .segment "DATA"
_paldetected: _paldetected:
.byte $FF .byte $FF
; --------------------------------------------------------------- ; ---------------------------------------------------------------
; unsigned char get_tv (void) ; unsigned char get_tv (void)
; --------------------------------------------------------------- ; ---------------------------------------------------------------
.segment "CODE" .segment "CODE"
.proc _get_tv: near .proc _get_tv: near
.segment "CODE" .segment "CODE"
ldx #$00 ldx #$00
lda #$FF lda #$FF
cmp _paldetected cmp _paldetected
bne L8 bne L8
L1: lda MSTAT L1: lda MSTAT
and #$80 and #$80
bne L1 bne L1
L2: lda MSTAT L2: lda MSTAT
and #$80 and #$80
beq L2 beq L2
L3: lda MSTAT L3: lda MSTAT
and #$80 and #$80
bne L3 bne L3
lda #$00 lda #$00
sta M0001 sta M0001
jmp L5 jmp L5
L4: sta MWSYNC L4: sta MWSYNC
sta MWSYNC sta MWSYNC
dec M0001 dec M0001
L5: lda MSTAT L5: lda MSTAT
and #$80 and #$80
beq L4 beq L4
lda M0001 lda M0001
cmp #$78 cmp #$78
bcc L6 bcc L6
lda #TV::NTSC lda #TV::NTSC
jmp L7 jmp L7
L6: lda #TV::PAL L6: lda #TV::PAL
L7: sta _paldetected L7: sta _paldetected
ldx #$00 ldx #$00
L8: lda _paldetected L8: lda _paldetected
rts rts
.segment "BSS" .segment "BSS"
M0001: M0001:
.res 1,$00 .res 1,$00
.endproc .endproc

View File

@@ -8,7 +8,7 @@
.include "atari7800.inc" .include "atari7800.inc"
.code .code
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
initirq: initirq:
@@ -27,10 +27,10 @@ IRQStub:
tya tya
pha pha
jsr callirq ; Call the functions jsr callirq ; Call the functions
pla pla
tay tay
pla pla
tax tax
@L1: pla @L1: pla
rti rti

View File

@@ -88,74 +88,74 @@ COUNT:
; READ: Read a particular joystick passed in A for 2 fire buttons. ; READ: Read a particular joystick passed in A for 2 fire buttons.
readbuttons: readbuttons:
; Y has joystick of interest 0/1 ; Y has joystick of interest 0/1
; return value: ; return value:
; $00: no button, ; $00: no button,
; $01: left/B button, ; $01: left/B button,
; $02: right/A button, ; $02: right/A button,
; $03: both buttons ; $03: both buttons
; preserves X ; preserves X
tya tya
beq L5 beq L5
; Joystick 1 processing ; Joystick 1 processing
; 7800 joystick 1 buttons ; 7800 joystick 1 buttons
ldy #0 ; ........ ldy #0 ; ........
bit INPT2 ; Check for right button bit INPT2 ; Check for right button
bpl L1 bpl L1
ldy #2 ; ......2. ldy #2 ; ......2.
L1: bit INPT3 ;Check for left button L1: bit INPT3 ;Check for left button
bpl L2 bpl L2
iny ; ......21 iny ; ......21
L2: tya L2: tya
bne L4 ; 7800 mode joystick worked bne L4 ; 7800 mode joystick worked
; 2600 Joystick 1 ; 2600 Joystick 1
bit INPT5 bit INPT5
bmi L4 bmi L4
L3: iny ; .......1 L3: iny ; .......1
lda #0 ; Fallback to 2600 joystick mode lda #0 ; Fallback to 2600 joystick mode
sta CTLSWB sta CTLSWB
L4: tya ; ......21 L4: tya ; ......21
rts rts
L5: ; Joystick 0 processing L5: ; Joystick 0 processing
; 7800 joystick 0 buttons ; 7800 joystick 0 buttons
ldy #0 ; ........ ldy #0 ; ........
bit INPT0 ; Check for right button bit INPT0 ; Check for right button
bpl L6 bpl L6
ldy #2 ; ......2. ldy #2 ; ......2.
L6: bit INPT1 ;Check for left button L6: bit INPT1 ;Check for left button
bpl L7 bpl L7
iny ; ......21 iny ; ......21
L7: tya L7: tya
bne L4 ; 7800 mode joystick worked bne L4 ; 7800 mode joystick worked
; 2600 Joystick 0 ; 2600 Joystick 0
bit INPT4 bit INPT4
bmi L4 bmi L4
bpl L3 bpl L3
READ: READ:
tay ; Store joystick 0/1 in Y tay ; Store joystick 0/1 in Y
beq L8 beq L8
lda SWCHA ; Read directions of joystick 1 lda SWCHA ; Read directions of joystick 1
rol ; ...RLDU. rol ; ...RLDU.
rol ; ..RLDU.. rol ; ..RLDU..
rol ; .RLDU... - joystick 1 rol ; .RLDU... - joystick 1
jmp L9 jmp L9
L8: lda SWCHA ; Read directions of joystick 0 L8: lda SWCHA ; Read directions of joystick 0
ror ; .RLDU... - joystick 0 ror ; .RLDU... - joystick 0
L9: tax L9: tax
jsr readbuttons ; A = ......21, X = .RLDU... jsr readbuttons ; A = ......21, X = .RLDU...
ror ; A = .......2 1 ror ; A = .......2 1
tay ; Y = .......2 tay ; Y = .......2
txa ; A = .RLDU... txa ; A = .RLDU...
ror ; A = 1.RLDU.. ror ; A = 1.RLDU..
tax ; X = 1.RLDU.. tax ; X = 1.RLDU..
tya ; A = .......2 tya ; A = .......2
ror ; A = ........ 2 ror ; A = ........ 2
txa ; A = 1.RLDU.. txa ; A = 1.RLDU..
rol ; A = .RLDU..2 1 rol ; A = .RLDU..2 1
rol ; A = RLDU..21 rol ; A = RLDU..21
eor #$F0 ; The direction buttons were inversed eor #$F0 ; The direction buttons were inversed
and #$F3 and #$F3
rts rts

View File

@@ -61,7 +61,7 @@
; 00 00 00 00 ; spares ; 00 00 00 00 ; spares
; 00 ; End of encrypted header mark ; 00 ; End of encrypted header mark
; ;
; .reloc ; .reloc
;********************************** ;**********************************
; After compilation, encryption and obfuscation it turns into this. ; After compilation, encryption and obfuscation it turns into this.
;********************************** ;**********************************

View File

@@ -138,21 +138,21 @@ int main (void) {
} }
else else
{ {
for ( l = 0; l <= heap_size; l++ ) { for ( l = 0; l <= heap_size; l++ ) {
buffer[l] = tapio[l]; buffer[l] = tapio[l];
} }
p = strlen ( buffer ); p = strlen ( buffer );
putchar ( '\r' ); putchar ( '\r' );
for ( l = 0; l < 25; l++ ) { for ( l = 0; l < 25; l++ ) {
putchar ( '\n' ); putchar ( '\n' );
} }
puts ("===================== Sym-1 Notepad ====================\n"); puts ("===================== Sym-1 Notepad ====================\n");
for ( l = 0; l <= p; l++ ) { for ( l = 0; l <= p; l++ ) {
putchar ( buffer[l] ); putchar ( buffer[l] );
} }
} }
} }
else if ( c == 0x03 ) { // Clear else if ( c == 0x03 ) { // Clear

View File

@@ -29,16 +29,16 @@ static unsigned char failures = 0;
int main(void) int main(void)
{ {
unsigned int x = 65535; unsigned int x = 65535;
unsigned short y = 65535; unsigned short y = 65535;
if (!(x > 1L)) { if (!(x > 1L)) {
printf("x = %ld but x > 1L failed\n", (long)x); printf("x = %ld but x > 1L failed\n", (long)x);
++failures; ++failures;
} }
if (!(y == 65535L)) { if (!(y == 65535L)) {
printf("y = %ld but y == 65535L failed\n", (long)y); printf("y = %ld but y == 65535L failed\n", (long)y);
++failures; ++failures;
} }
printf("failures: %u\n", failures); printf("failures: %u\n", failures);
return failures; return failures;
} }