Sebastian Gutsfeld <segoh@gmx.net> writes: > Has anybody a link to this GT2 player conversion? I seem already too > stupid for the DASM to CA65 conversion. I know I probably make too great > demands but can anybody produce a working CA65 version from this short > DASM code and tell me how he assembles/links/... it with CA95 to get a > working PRG? Thanks to Johan Kotlinski I've found the solution for my problem: I have to add a "fill = yes" to the RAM MEMORY entry in the linker config and everything is fine :) Here's my simple code, maybe it's some help for other newbies: ,----[ sid_player_ca65.s ] | .export _main | .segment "CODE" | | _main: lda #$00 | tax | tay | jsr song ; Initialize music | | mainloop: | lda $d012 | cmp #$80 ; Is rasterline equal to #$80? | bne mainloop ; If not, keep checking | | inc $d020 ; Inc border color | jsr song+3 ; Jump to music play routine | dec $d020 ; Dec border color | jmp mainloop ; Keep looping | | | .segment "MUSIC" | song: .incbin "example2.bin" `---- ,----[ c64.cfg ] | MEMORY { | ZP: start = $0002, size = $001A, type = rw, define = yes; | RAM: start = $07FF, size = $0801, file = %O, define = yes, fill = yes; | MUSICRAM: start = $1000, size = $7400, define = yes; | } | SEGMENTS { | STARTUP: load = RAM, type = ro; | LOWCODE: load = RAM, type = ro, optional = yes; | INIT: load = RAM, type = ro, define = yes, optional = yes; | CODE: load = RAM, type = ro; | RODATA: load = RAM, type = ro; | DATA: load = RAM, type = rw; | BSS: load = RAM, type = bss, define = yes; | HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack | ZEROPAGE: load = ZP, type = zp; | MUSIC: load = MUSICRAM, type = ro; | } | FEATURES { | CONDES: segment = INIT, | type = constructor, | label = __CONSTRUCTOR_TABLE__, | count = __CONSTRUCTOR_COUNT__; | CONDES: segment = RODATA, | type = destructor, | label = __DESTRUCTOR_TABLE__, | count = __DESTRUCTOR_COUNT__; | CONDES: segment = RODATA, | type = interruptor, | label = __INTERRUPTOR_TABLE__, | count = __INTERRUPTOR_COUNT__; | } | SYMBOLS { | __STACKSIZE__ = $800; # 2K stack | } `---- I hope I'm not too annoying but can anybody explain why this only works with RAM filled with zeros? regards, Sebastian ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Fri Nov 3 12:33:23 2006
This archive was generated by hypermail 2.1.8 : 2006-11-03 12:33:27 CET