mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 22:25:28 +00:00
some more fiddling
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
; gamate symbols
|
; gamate symbols
|
||||||
|
|
||||||
.p02
|
;.p02
|
||||||
|
|
||||||
LCD_WIDTH = 160
|
LCD_WIDTH = 160
|
||||||
LCD_HEIGHT = 152
|
LCD_HEIGHT = 152
|
||||||
|
@@ -4,20 +4,29 @@
|
|||||||
# ld65 config file
|
# ld65 config file
|
||||||
# ld65 --config gamate.cfg -o <prog>.bin <prog>.o
|
# ld65 --config gamate.cfg -o <prog>.bin <prog>.o
|
||||||
|
|
||||||
|
SYMBOLS {
|
||||||
|
__STARTUP__: type = import;
|
||||||
|
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||||
|
}
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
ZP: start = $0000, size = $100;
|
ZP: start = $0000, size = $100;
|
||||||
CPUSTACK: start = $0100, size =$100;
|
CPUSTACK: start = $0100, size =$100;
|
||||||
RAM: start = $0200, size = $200, define = yes;
|
RAM: start = $0200, size = $200, define = yes;
|
||||||
# ROM: start = $6000, size = $8000, fill = yes, fillval = $ff, file = %O, define = yes;
|
# ROM: start = $6000, size = $8000, fill = yes, fillval = $ff, file = %O, define = yes;
|
||||||
|
# STARTUP: file = %O, define = yes, start = $6000, size = $29, fill = yes;
|
||||||
|
# ROM: start = $6000 + __STARTUP_SIZE__, size = $8000 - __STARTUP_SIZE__, fill = yes, fillval = $ff, file = %O, define = yes;
|
||||||
|
# WARNING: fill value must be $00 else it will no more work
|
||||||
ROM: start = $6000, size = $8000, fill = yes, fillval = $00, file = %O, define = yes;
|
ROM: start = $6000, size = $8000, fill = yes, fillval = $00, file = %O, define = yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
|
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||||
|
STARTUP: load = ROM, type = ro, define=yes;
|
||||||
CODE: load = ROM, type = ro, define=yes;
|
CODE: load = ROM, type = ro, define=yes;
|
||||||
RODATA: load = ROM, type = ro, define=yes;
|
RODATA: load = ROM, type = ro, define=yes;
|
||||||
DATA: load = ROM, run=RAM, type = rw, define = yes;
|
DATA: load = ROM, run=RAM, type = rw, define = yes;
|
||||||
BSS: load = RAM, type = bss, define = yes;
|
BSS: load = RAM, type = bss, define = yes;
|
||||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FEATURES {
|
FEATURES {
|
||||||
|
@@ -1 +1,16 @@
|
|||||||
|
|
||||||
|
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
||||||
|
|
||||||
|
.import reset, irq, nmi ; FIXME
|
||||||
|
|
||||||
|
|
||||||
|
.segment "STARTUP"
|
||||||
|
|
||||||
|
checksum:
|
||||||
|
.word 0
|
||||||
|
.byte 1, 0, 1
|
||||||
|
.byte "COPYRIGHT BIT CORPORATION", 0, $ff
|
||||||
|
jmp reset
|
||||||
|
jmp nmi
|
||||||
|
jmp irq
|
||||||
|
|
||||||
|
@@ -205,7 +205,7 @@ static const TargetProperties PropertyTable[TGT_COUNT] = {
|
|||||||
{ "sim6502", CPU_6502, BINFMT_BINARY, CTNone },
|
{ "sim6502", CPU_6502, BINFMT_BINARY, CTNone },
|
||||||
{ "sim65c02", CPU_65C02, BINFMT_BINARY, CTNone },
|
{ "sim65c02", CPU_65C02, BINFMT_BINARY, CTNone },
|
||||||
{ "pce", CPU_HUC6280, BINFMT_BINARY, CTNone },
|
{ "pce", CPU_HUC6280, BINFMT_BINARY, CTNone },
|
||||||
{ "gamate", CPU_6502, BINFMT_BINARY, CTNone },
|
{ "gamate", CPU_65C02, BINFMT_BINARY, CTNone },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Target system */
|
/* Target system */
|
||||||
|
@@ -1 +1,21 @@
|
|||||||
|
|
||||||
|
all: audiotest.bin lcdtest.bin
|
||||||
|
|
||||||
|
audiotest.bin: audiotest.s
|
||||||
|
# ../../../bin/ca65 -t gamate -o audiotest.o audiotest.s
|
||||||
|
# ../../../bin/ld65 -t gamate -o audiotest.bin audiotest.o
|
||||||
|
../../../bin/cl65 -t gamate -o audiotest.bin audiotest.s
|
||||||
|
|
||||||
|
lcdtest.bin: lcdtest.s
|
||||||
|
# ../../../bin/ca65 -t gamate -o lcdtest.o lcdtest.s
|
||||||
|
# ../../../bin/ld65 -t gamate -o lcdtest.bin lcdtest.o
|
||||||
|
../../../bin/cl65 -l bla.lst -t gamate -o lcdtest.bin lcdtest.s
|
||||||
|
|
||||||
|
test1: lcdtest.bin
|
||||||
|
cd /home/groepaz/Desktop/mame/winmess/ && wine mess.exe gamate -window -skip_gameinfo -cart /home/groepaz/Desktop/cc65/github/cc65/testcode/lib/gamate/lcdtest.bin
|
||||||
|
test2: audiotest.bin
|
||||||
|
cd /home/groepaz/Desktop/mame/winmess/ && wine mess.exe gamate -window -skip_gameinfo -cart /home/groepaz/Desktop/cc65/github/cc65/testcode/lib/gamate/audiotest.bin
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f lcdtest.o audiotest.o
|
||||||
|
rm -f lcdtest.bin audiotest.bin
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
.export reset, irq, nmi ; FIXME
|
||||||
|
|
||||||
.include "gamate.inc"
|
.include "gamate.inc"
|
||||||
.zeropage
|
.zeropage
|
||||||
addr: .word 0
|
addr: .word 0
|
||||||
@@ -25,12 +28,6 @@ xpos: .byte 0
|
|||||||
ypos: .byte 0
|
ypos: .byte 0
|
||||||
|
|
||||||
.code
|
.code
|
||||||
checksum: .word 0
|
|
||||||
.byte 1,0,1
|
|
||||||
.byte "COPYRIGHT BIT CORPORATION", 0, $ff
|
|
||||||
jmp reset
|
|
||||||
jmp nmi
|
|
||||||
jmp irq
|
|
||||||
|
|
||||||
chars:
|
chars:
|
||||||
.incbin "cga2.chr"
|
.incbin "cga2.chr"
|
||||||
|
@@ -1,4 +1,9 @@
|
|||||||
|
|
||||||
|
.export reset, irq, nmi ; FIXME
|
||||||
|
|
||||||
|
|
||||||
.include "gamate.inc"
|
.include "gamate.inc"
|
||||||
|
|
||||||
.zeropage
|
.zeropage
|
||||||
addr: .word 0
|
addr: .word 0
|
||||||
psa: .word 0
|
psa: .word 0
|
||||||
@@ -17,12 +22,6 @@ xpos: .byte 0
|
|||||||
ypos: .byte 0
|
ypos: .byte 0
|
||||||
|
|
||||||
.code
|
.code
|
||||||
checksum: .word 0
|
|
||||||
.byte 1,0,1
|
|
||||||
.byte "COPYRIGHT BIT CORPORATION", 0, $ff
|
|
||||||
jmp reset
|
|
||||||
jmp nmi
|
|
||||||
jmp irq
|
|
||||||
|
|
||||||
chars:
|
chars:
|
||||||
.incbin "cga2.chr"
|
.incbin "cga2.chr"
|
||||||
@@ -37,6 +36,7 @@ ydesc: .byte "0123456789ABCDEFGHIJKLMNOPQRSTUV", 0
|
|||||||
rts
|
rts
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
.proc irq
|
.proc irq
|
||||||
inc irq_count
|
inc irq_count
|
||||||
lda count
|
lda count
|
||||||
@@ -88,7 +88,6 @@ ydesc: .byte "0123456789ABCDEFGHIJKLMNOPQRSTUV", 0
|
|||||||
sty lcd_y
|
sty lcd_y
|
||||||
jsr printstringy
|
jsr printstringy
|
||||||
|
|
||||||
|
|
||||||
lda #<format
|
lda #<format
|
||||||
ldx #>format
|
ldx #>format
|
||||||
ldy #8
|
ldy #8
|
||||||
@@ -177,6 +176,7 @@ ydesc: .byte "0123456789ABCDEFGHIJKLMNOPQRSTUV", 0
|
|||||||
lda #'V'
|
lda #'V'
|
||||||
jsr printsign
|
jsr printsign
|
||||||
|
|
||||||
|
|
||||||
lda #1
|
lda #1
|
||||||
sta nmi_enable
|
sta nmi_enable
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user