Page 1 of 2

Multi ROM for DITTO mini PUBLIC BETA!

Posted: May 13th, 2019, 02:47
by zoranc
Here is initial bootloader code to be used with DITTO mini cart, and provides multiboot functionality:
bootloader.min
Bootloader for DITTO mini
(512 KiB) Downloaded 1034 times
One can concatenate 512K game roms to this file and the burn the rsult as a normal min file. The command to do it for linux/mac with files p1, p2, p3.min is:

Code: Select all

cat bootloader.min p1.min p2.min p3.min > result.min
Windows command is I believe:

Code: Select all

copy bootloader.min/b + p1.min/b + p2.min/b + p3.min/b result.min
One can write homebrew roms of the size 64K at any offset that is multiply of 64K starting with 128K, but this is somewhat more involving. This would give option of up to 30 games (currently only 8 are handled by the bootloader menu).
For those interested in mechanisms used to make it work here is the source code:
bootloader.tar.gz
Source code for the bootloader
(6.89 KiB) Downloaded 1000 times
Basically switching the pages is done by writing the page value to the address 0x1FFFFF.
All possible values for bank switching are:
Value 0 is 2MB addressing the full memory space.
Values 1 - 31 are for 64K segments where the value chooses the respective segment.
Values 0x80 - 0x83 are 512K segments, masking the low two bits chooses which of the segments will be used. So 0x80 is the one from offset 0, 0x81 is the one from offset 512K, etc.
The bank switching should be done typically in RAM since the effect of the switch will be immediately applied, and the next address fetched is from the new bank!
Another important detail is that in 64K mode the program can only access those 64K and nothing outside of it, same for the 512K mode only one quarter of the flash is accessible for reading!

Re: Multiboot for DITTO mini

Posted: May 13th, 2019, 02:54
by zoranc
Initial issues with freezing were solved for most part...

Many other features could be added too. Those that I'd like are: remembering the last started game and restart it by pressing "B", backup and restore saves, dumping the BIOS, transferring games between two consoled over IrDA...

Re: Multiboot for DITTO mini

Posted: May 13th, 2019, 10:09
by Sprinter
Thank you very much, Keep up with your good work.

Re: Multiboot for DITTO mini

Posted: May 13th, 2019, 12:35
by riendegraaf
I don't get it I quess... With the file 'bootloader.min' it should be possible to write more than one game on the DittoMini card?? But how do I have to do that? Do I have to use the program I use for writing games to the dittomini??

Re: Multiboot for DITTO mini

Posted: May 13th, 2019, 15:05
by Pikpol
zoranc wrote:There is a known issue of roms having trouble after power off is pressed, after pressing it again for power on, the console freezes. One would need to press the reset button (the one bellow the power button) with something sharp in order to unfreeze it. I am not sure what are the reasons for this and need to debug it! Another minor annoyance is that the clock gets lost for some reason and some games as the user to enter the new clock on each new start. Sorry about those issues, I hope they would be resolved at some point.

Many other features could be added too. Those that I'd like are: remembering the last started game and restart it by pressing "B", backup and restore saves, dumping the BIOS, transferring games between two consoled over IrDA...
I think you always need to remember the last started game to solve those powering on issues. As some games will keep their state when you power off and on again.

Transferring games through IrDA would be a nice feature :P

Re: Multiboot for DITTO mini

Posted: May 14th, 2019, 02:27
by zoranc
riendegraaf wrote:I don't get it I quess... With the file 'bootloader.min' it should be possible to write more than one game on the DittoMini card?? But how do I have to do that? Do I have to use the program I use for writing games to the dittomini??
You need to use one of the above commands (depending on your OS), to create a result.min out of bootloader.min and 2 or 3 other ROMs. Then burn the result.min like a normal ROM. All is still rough around the edges but semi-usable.

Re: Multiboot for DITTO mini

Posted: May 14th, 2019, 02:31
by zoranc
Pikpol wrote:I think you always need to remember the last started game to solve those powering on issues. As some games will keep their state when you power off and on again.
Unfortunately that is probably not possible. The reason for this is that the power to the cart is cut once the power button is pressed, thus resetting the bank to 0.
Pikpol wrote:Transferring games through IrDA would be a nice feature :P
Frankly I have no clue how the IrDA works, so any help is highly appreciated!

Re: Multiboot for DITTO mini

Posted: May 15th, 2019, 01:23
by zoranc
WARNING - OLD VERSION WITH ISSUES! The latest is in the first post in this topic.

OK, the timer reset problem is fixed instead of _int(0x0) one needs to use _int(0x2). Since it is a slight change I'll attach only the binary:
bootloader.min
BAD BOOTLOADER! AVOID IT!
(512 KiB) Downloaded 955 times
The sleep mode crash is still a issue. I suspect the only solution would be ROM patching...

Re: Multi ROM for DITTO mini PUBLIC BETA!

Posted: May 17th, 2019, 03:43
by zoranc
Fixed the freeze too. The new code is re-uploaded in the initial post. Also the new sources.

Currently fixes are needed for race, breeder, togepi, pichu and tetris. Both version of tetris work with a trick but the other 4 games need a patch. The patch is applied on the first start of the bootloader. Its not optimal but it works.

Re: Multi ROM for DITTO mini PUBLIC BETA!

Posted: May 20th, 2019, 05:44
by zoranc
Now patches the translated ROMs too... Updated the first post. Enjoy!