Posted By
Stinaris on 2020-11-26 13:01:59
| Cartridge creation tutorial
I'm trying to get my own code onto a cartridge.
I can happily burn it but when I put it in to the machine I just get the standard C16 startup. Is a special header required?
|
|
Posted By
gerliczer on 2020-11-26 14:20:22
| Re: Cartridge creation tutorial
AFAIK, a cartridge image should page into the low ROM area such content that has the following from $8000: $8000 JMP $XXXX cold reset vector, $8003 JMP $YYYY warm reset vector, $8006 start flag $00/$01 the latter meaning auto-run and $8007 the CBM signature. You could analyse for example the Jack Attack cartridge image to see for yourself how its actually done.
|
|
Posted By
Luca on 2020-11-26 14:41:25
| Re: Cartridge creation tutorial
...and I will copypaste my hint: I suggest you to follow the line of 2games, which is the tangible result of a similar thread on the German's most known forum (link in its notes), where to read step by step hints to program EPROm stuff in the working way Spoiler: some very useful .asm sources ready-to-use inside!
|
|
Posted By
Stinaris on 2020-11-26 16:34:02
| Re: Cartridge creation tutorial
Ah the old header not correct problem. I suspected as much. Jack attack jumps off to a couple of locations before the CBM part. That tutorial looks good. A couple of questions though. What is BE in this * = $ 800b be lda $ fb
Also what does jmp * do?
I'm not familiar with either of these.
|
|
Posted By
Csabo on 2020-11-26 16:39:29
| Re: Cartridge creation tutorial
In most assemblers, * means the current location. JMP * is basically an infinite loop (for example, if you happen to compile "JMP *" to memory location $1234, it would become JMP $1234). "be" is likely a label - though I'm not sure where you took there from, so it might be something else. Label can be used in place of real addresses, e.g. later on an assembler will be able to change "BEQ be" into actual code.
|
|
Posted By
Stinaris on 2020-11-27 04:05:13
| Re: Cartridge creation tutorial
The example is taken from the link Luca gave. Most of it makes sense I'm just stuck on be. I assumed it must be some assembler directive.
! to "c16cart.crt", plain * = $ 8000 jmp $ 800b jmp $ 800b ! by $ 02, $ 43, $ 42, $ 4d; $ ?? bank, "CBM" * = $ 800b be lda $ FB pha ldx $ 8006; cartrige 1 lo, kernal sta $ FDD0, X jsr $ FF84; Initialize I / O devices jsr $ FF87; RAM test pla sta $ FB jsr $ FF8A; Restore vectors to initial values jsr $ FF81; Initialize screen editor lda # <cartrige; cartridge jump in sta $ 02FE lda #> cartrige sta $ 02FF lda # $ F1; irq -> banking routines sta $ 0314 lda # $ FC sta $ 0315 cli jmp * cartrige: ldx # $ 00 - lda mytxt, x sta $ 0c50, x inx cpx # $ 28 bne - jmp * mytxt:! scr "the module was displayed appropriately!"
|
|
Posted By
gerliczer on 2020-11-27 04:26:15
| Re: Cartridge creation tutorial
And what happens if you simply delete that line?
|
|
Posted By
Luca on 2020-11-27 07:44:46
| Re: Cartridge creation tutorial
Stinaris: mh, weird, in all the codelistings I saw in that thread, I've found a SEI where you read "be"...
|
|
Posted By
Stinaris on 2020-11-27 11:28:03
| Re: Cartridge creation tutorial
Luca,
I think you are right. There is a CLI at the end. It has to be an SEI. I'm struggling to read at the moment, got a sinus migraine, but trying to get through as this is quite interesting.
No nothing to do with that. I translated to English. That converted SEI to BE. Doh!
Gerlizer, Yeah, possibly. I suspected it was important. It looks like it is.
Well I tried it, I just get a garbage screen. Hmmmm!
|
|