Apologies if this is already covered somewhere else - use of the search function didn’t reveal usable information for me…
… what is the mechanism for auto detecting and then running the code on a cartridge?
Cartridge Autostart
Re: Cartridge Autostart
https://github.com/X16Community/x16-doc ... cartridges
It's in a less-than-obvious place... we could probably call that out in a better spot in the manual.
It's in a less-than-obvious place... we could probably call that out in a better spot in the manual.
-
- Posts: 138
- Joined: Tue Jul 21, 2020 10:08 pm
Re: Cartridge Autostart
Perfect - thank you!TomXP411 wrote: ↑Fri Jul 12, 2024 12:06 am https://github.com/X16Community/x16-doc ... cartridges
It's in a less-than-obvious place... we could probably call that out in a better spot in the manual.
-
- Posts: 5
- Joined: Sun Jan 31, 2021 11:02 pm
Re: Cartridge Autostart
Are there any tutorial for creating a ROM cartridge from start to finish step by step?
-
- Posts: 6
- Joined: Tue Oct 31, 2023 6:43 am
Re: Cartridge Autostart
If you mean the hardware part, I've got a 'tutorial' schematic at https://github.com/jkominek/x16simplecart which includes gerber files for a PCB you can have made for personal use. Or you can work through the schematic, replicate that, and do as you please with the result.fraggintarget wrote: ↑Sat Jul 20, 2024 7:34 pm Are there any tutorial for creating a ROM cartridge from start to finish step by step?
I don't think I've seen anything on the software portion, but if I do I'll try to remember to add a link to it.
Re: Cartridge Autostart
I think I answered that in my thread already, but I can repeat it here in a maybe better structured way. At least, if you're speaking about the software side:fraggintarget wrote: ↑Sat Jul 20, 2024 7:34 pm Are there any tutorial for creating a ROM cartridge from start to finish step by step?
- You want to have at least one ROM bank of 16kb, which starts with "CX16" at $c000 and is attached with the -cart parameter of the emulator.
- In case you're unsure about the keymap used by your assembler, use $43, $58, $31, $36 directly.
- Assemble your boot code into a bin file without any program header or start addresse at the beginning.
- Build your cartridge with the created bin file with the makecart utility of the emulator, use -rom_file 32 my.bin to make it bank 32, which is read by the kernal and tested for the header (See boot_cartridge in kernal\drivers\x16.s)
- Your program starts from $c004, it is up to you, how to handle the system now.
- Most likely you want to do some initialization now and copy a payload code into the RAM of the X16.
- Jump to the start address of this payload, assuming, your code begins at the head of it, otherwise another appropiate address
Keep in mind some issues with the makecart utility:
- In the docs, it is specified, that the payload of the cartridge starts at byte 512, but in reality, it is byte 480.
- The -rom_file parameter documents, it would pack multiple bin files back to back in the specified bank and continuing, but due to a bug in the parameter parsing, this is not the case yet, only one file is considered. Better you concat the bin files yourself and provide a single file instead.
-
- Posts: 5
- Joined: Sun Jan 31, 2021 11:02 pm
Re: Cartridge Autostart
Thanks. Simple instructions tend help me be successful.
-
- Posts: 5
- Joined: Sun Jan 31, 2021 11:02 pm
Re: Cartridge Autostart
Just received 5 boards and will be putting something on them soon.JayKominek wrote: ↑Thu Aug 01, 2024 2:08 amIf you mean the hardware part, I've got a 'tutorial' schematic at https://github.com/jkominek/x16simplecart which includes gerber files for a PCB you can have made for personal use. Or you can work through the schematic, replicate that, and do as you please with the result.fraggintarget wrote: ↑Sat Jul 20, 2024 7:34 pm Are there any tutorial for creating a ROM cartridge from start to finish step by step?
I don't think I've seen anything on the software portion, but if I do I'll try to remember to add a link to it.