moved cart header into seperate file, moved nmi stub into several file, tweaked linker config
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
; original audiotest.s by PeT (mess@utanet.at)
|
||||
|
||||
.export _main
|
||||
.include "gamate.inc"
|
||||
|
||||
.zeropage
|
||||
@@ -29,17 +28,15 @@ psy: .byte 0
|
||||
xpos: .byte 0
|
||||
ypos: .byte 0
|
||||
|
||||
.code
|
||||
.code
|
||||
|
||||
chars:
|
||||
.incbin "cga2.chr"
|
||||
|
||||
hex2asc: .byte "0123456789abcdef"
|
||||
chars: .incbin "cga2.chr"
|
||||
hex2asc: .byte "0123456789abcdef"
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.export IRQStub
|
||||
.export IRQStub, NMIStub
|
||||
|
||||
.proc nmi
|
||||
.proc NMIStub
|
||||
inc nmi_count
|
||||
rts
|
||||
.endproc
|
||||
@@ -50,8 +47,9 @@ hex2asc: .byte "0123456789abcdef"
|
||||
.endproc
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.export Start
|
||||
|
||||
.proc _main
|
||||
.proc Start
|
||||
lda #>AUDIO_BASE
|
||||
sta writeaddr+1
|
||||
sta readaddr+1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <conio.h>
|
||||
|
||||
unsigned char y = 0;
|
||||
unsigned char x;
|
||||
unsigned char x = 0;
|
||||
unsigned short n;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -22,14 +22,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
n = clock();
|
||||
|
||||
gotoxy(0,2);cprintf("%04x %02x %02x", n, x, y);
|
||||
gotoxy(0,2);cprintf("%04x %02x %02x %02x", n, x, y, *((unsigned char*)JOY_DATA));
|
||||
|
||||
switch((*((unsigned char*)JOY_DATA))) {
|
||||
case 0xff ^ JOY_DATA_UP:
|
||||
++y;
|
||||
++y; if (y == 0xc8) y = 0;
|
||||
break;
|
||||
case 0xff ^ JOY_DATA_DOWN:
|
||||
--y;
|
||||
--y; if (y == 0xff) y = 0xc7;
|
||||
break;
|
||||
case 0xff ^ JOY_DATA_LEFT:
|
||||
++x;
|
||||
@@ -40,14 +40,12 @@ int main(int argc, char *argv[])
|
||||
case 0xff ^ JOY_DATA_FIRE_A:
|
||||
break;
|
||||
}
|
||||
if (y == 0xff) y = 0xc7;
|
||||
if (y == 0xc8) y = 0;
|
||||
|
||||
waitvblank();
|
||||
|
||||
(*((unsigned char*)LCD_XPOS)) = x;
|
||||
(*((unsigned char*)LCD_YPOS)) = y;
|
||||
|
||||
waitvblank();
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
; original lcdtest.s by PeT (mess@utanet.at)
|
||||
|
||||
.export _main
|
||||
.include "gamate.inc"
|
||||
|
||||
.zeropage
|
||||
@@ -32,15 +31,15 @@ xdesc: .byte "0123456789abcdefghijklmnopqrstuv", 0
|
||||
ydesc: .byte "0123456789ABCDEFGHIJKLMNOPQRSTUV", 0
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.export IRQStub, NMIStub
|
||||
|
||||
.proc nmi
|
||||
|
||||
.proc NMIStub
|
||||
|
||||
inc nmi_count
|
||||
rts
|
||||
.endproc
|
||||
|
||||
.export IRQStub
|
||||
|
||||
.proc IRQStub
|
||||
|
||||
inc irq_count
|
||||
@@ -55,8 +54,9 @@ ydesc: .byte "0123456789ABCDEFGHIJKLMNOPQRSTUV", 0
|
||||
.endproc
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.export Start
|
||||
|
||||
.proc _main
|
||||
.proc Start
|
||||
|
||||
lda #0
|
||||
sta LCD_XPOS
|
||||
|
||||
Reference in New Issue
Block a user