Multi ROM for DITTO mini PUBLIC BETA!

PM development, programming, hacking and all that fun stuff.
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Multi ROM for DITTO mini PUBLIC BETA!

Post 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 1035 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 1001 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!
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Multiboot for DITTO mini

Post 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...
Sprinter
Posts: 17
Joined: April 29th, 2019, 00:59

Re: Multiboot for DITTO mini

Post by Sprinter »

Thank you very much, Keep up with your good work.
riendegraaf
Posts: 20
Joined: October 5th, 2016, 02:32

Re: Multiboot for DITTO mini

Post 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??
User avatar
Pikpol
PM.net Staff
Posts: 39
Joined: May 21st, 2017, 13:37

Re: Multiboot for DITTO mini

Post 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
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Multiboot for DITTO mini

Post 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.
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Multiboot for DITTO mini

Post 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!
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Multiboot for DITTO mini

Post 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...
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Multi ROM for DITTO mini PUBLIC BETA!

Post 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.
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: Multi ROM for DITTO mini PUBLIC BETA!

Post by zoranc »

Now patches the translated ROMs too... Updated the first post. Enjoy!
Post Reply