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

View File

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

View File

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

View File

@ -4,15 +4,15 @@
; This header contains data for emulators
;
.export __EXEHDR__: absolute = 1
.import __CARTSIZE__
.import __CARTSIZE__
; ------------------------------------------------------------------------
; EXE header
.segment "EXEHDR"
.byte 3 ; version
.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 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
.segment "EXEHDR"
.byte 3 ; version
.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 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
; bit 0 - pokey at 4000
; bit 1 - supergame bank switched
; bit 2 - supergame ram at $4000
@ -28,19 +28,19 @@
; bit 12 - souper
; bit 13-15 - Special
; 0 = Normal cart
.byte 0,0 ; 0 = Normal cart
.byte 1 ; 1 = Joystick, 2 = lightgun
.byte 0 ; No joystick 2
.byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite
.byte 0 ; Save data peripheral - 1 byte (version 2)
.byte 0,0 ; 0 = Normal cart
.byte 1 ; 1 = Joystick, 2 = lightgun
.byte 0 ; No joystick 2
.byte 0 ; bit0 = 0:NTSC,1:PAL bit1 = 0:component,1:composite
.byte 0 ; Save data peripheral - 1 byte (version 2)
; 0 = None / unknown (default)
; 1 = High Score Cart (HSC)
; 2 = SaveKey
.byte 0 ; 63 Expansion module
.byte 0 ; 63 Expansion module
; 0 = No expansion module (default on all currently released games)
; 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
.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 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 '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)
;
.include "atari7800.inc"
.include "get_tv.inc"
.export _get_tv
.export _paldetected
.include "atari7800.inc"
.include "get_tv.inc"
.export _get_tv
.export _paldetected
.segment "DATA"
.segment "DATA"
_paldetected:
.byte $FF
.byte $FF
; ---------------------------------------------------------------
; unsigned char get_tv (void)
; ---------------------------------------------------------------
.segment "CODE"
.segment "CODE"
.proc _get_tv: near
.proc _get_tv: near
.segment "CODE"
.segment "CODE"
ldx #$00
lda #$FF
cmp _paldetected
bne L8
L1: lda MSTAT
and #$80
bne L1
L2: lda MSTAT
and #$80
beq L2
L3: lda MSTAT
and #$80
bne L3
lda #$00
sta M0001
jmp L5
L4: sta MWSYNC
sta MWSYNC
dec M0001
L5: lda MSTAT
and #$80
beq L4
lda M0001
cmp #$78
bcc L6
lda #TV::NTSC
jmp L7
L6: lda #TV::PAL
L7: sta _paldetected
ldx #$00
L8: lda _paldetected
rts
ldx #$00
lda #$FF
cmp _paldetected
bne L8
L1: lda MSTAT
and #$80
bne L1
L2: lda MSTAT
and #$80
beq L2
L3: lda MSTAT
and #$80
bne L3
lda #$00
sta M0001
jmp L5
L4: sta MWSYNC
sta MWSYNC
dec M0001
L5: lda MSTAT
and #$80
beq L4
lda M0001
cmp #$78
bcc L6
lda #TV::NTSC
jmp L7
L6: lda #TV::PAL
L7: sta _paldetected
ldx #$00
L8: lda _paldetected
rts
.segment "BSS"
.segment "BSS"
M0001:
.res 1,$00
.res 1,$00
.endproc

View File

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

View File

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

View File

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

View File

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

View File

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