Neo Myth Menu beta

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Neo Myth Menu beta

Post by Chilly Willy » Sat Nov 28, 2009 9:43 pm

Okay, here's the beta for my new menu for the Neo Myth. Lots of goodies here.

Notes:
SMS roms cannot reset back to the menu. SMS mode won't activate unless it's set for reset to game, so that cannot be altered.

MD/32X roms default to reset to menu. Go to the option screen to set the reset mode to reset to game.

To use this, copy the MDBIOS.BIN file to the Neo2 Ultra Menu directory, run the app, click the Format tab, and format the MD Myth. At that point, you can add your roms. When you boot the menu, the bottom of the display tells you what the controls do. It should be pretty self explanatory.

Let me know if you run into problems.

2009/11/28 - Beta 1 released. NeoMythMenuBeta1.zip
2009/11/30 - Beta 2 released. NeoMythMenuBeta2.zip
2009/12/05 - Beta 3 released. NeoMythMenuBeta3.zip
2009/12/06 - Beta 4 released. NeoMythMenuBeta4.zip
2009/12/06 - Beta 5 released. NeoMythMenuBeta5.zip
2009/12/08 - Beta 6 released. NeoMythMenuBeta6.zip
2009/12/11 - Beta 7 released. NeoMythMenuBeta7.zip
2009/12/11 - Beta 8 released. NeoMythMenuBeta8.zip
Last edited by Chilly Willy on Fri Dec 11, 2009 8:37 pm, edited 7 times in total.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Nov 30, 2009 9:09 pm

Okay, beta 2 is up.

Fixed reset init (when reset to menu).
Fixed EEPROM selection (lack of understanding on my part).
Added RTC to the display (mostly to show it can be done).
When the rom header info is shown, if there's no domestic name, it now shows the export name.

mic_
Very interested
Posts: 265
Joined: Tue Aug 12, 2008 12:26 pm
Location: Sweden
Contact:

Post by mic_ » Mon Nov 30, 2009 9:37 pm

You got the color scheme from the Megadrive Action Replay 2? :T

Anyway, much nicer than the default menu, since I can now see 15 titles at once.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Dec 01, 2009 12:52 am

mic_ wrote:You got the color scheme from the Megadrive Action Replay 2? :T
Is it? I've never even seen MD AR2. It just started as white text on a blue background, then I added green as a high-lite, then people wanted the blue background made black, then finally I added red in counterpoint to the green.
Anyway, much nicer than the default menu, since I can now see 15 titles at once.
Yeah, the original menu not only showed only one title at a time, but it didn't erase the title line before printing, so you wound up with a mishmash on the line after just a couple titles.

It was nice of Dr Neo to open the code. He's also pretty good with info when you need it. That's allowed folks like moi to make a better menu.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun Dec 06, 2009 3:52 am

Okay - beta 3 is up! This has the first SD card support.

Notes:
Due to space limitations, the SD card support only handles FAT12 and FAT16. No FAT32 formatted cards. You also only see the short (8.3) filenames.

Due to the type of FAT file system I was forced to resort to because of the space limitations, SD card speed is SLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW. Pulling up a directory with several entries can take 10 to 15 seconds (I hate to think what a directory with hundreds of entries would take, but I do support up to 639 entries). Loading a file is very slow, taking a couple minutes for a 4MB rom. I'll work on the speed when I get the chance.

MD and 32X games seem to work fine. SMS games load, but don't start - I'm looking into that.

Press B on a directory entry to enter that directory. The first entry of any directory but the root will be ".." which will take you back one level if you press B while it's selected.

Files in the SD directory listing will show as "Unknown" until you press A, B, or C. If you wish to see the type of file, press C. The reason I don't automatically determine the file type when you get the directory listing is it slows the directory fetch down. A LOT! So I put off determining the file type until called for.

Only raw binary images are supported on the SD card. That will probably change in the future, but for now, if something needs to be patched or converted, do it before you put it on the card.

Entries for both the flash and the SD are sorted (alphabetically) now.

To make space needed for SD card support, the RTC code was commented out. It may or may not show again later.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Dec 07, 2009 12:05 am

Okay, beta 4 is up. The main change here is speed - the SD card directory and file info speed is considerably faster than it was. The file read speed is still pretty slow, but it's up to 64KB per second.

I also incorporated the changes in Dr Neo's menu v2.23 into this, so it should work with the V12 Neo Myth and new flash cart (untested).

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Dec 07, 2009 3:11 am

Beta 5 is up... I didn't replace ALL the SD code with assembly - just the inner loop that transfers the data. I was wrong about the speed before - it was really closer to 11KB/sec, not 64. This release almost triples the read speed - from 11KB/sec to 30KB/sec.

Graz
Very interested
Posts: 81
Joined: Thu Aug 23, 2007 12:36 am
Location: Orlando, FL

Post by Graz » Mon Dec 07, 2009 12:36 pm

Hi Chilly,

It's tough to be certain without being able to play around with the code. I think I may know where some of your performance is going. The filesystem code calls disk_readp repeatedly when doing things like getting directory lists. The sector is always the same between calls, but you always call sendSdReadSingleBlockCmd4. However, because the sector is the same between successive calls, the content of sec_buf is still valid. I think if you keep (in another global variable) the last sector read and only do sendSdReadSingleBlockCmd4 if the sector has changed, you can copy the data right out of sec_buf and avoid the read. This could at least speed up directory parsing considerably.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Dec 07, 2009 7:13 pm

You must have missed my post on beta 4 where I introduced a cache for just that reason. If you notice, I remarked that the directory and file info speeds were considerably faster due to the cache. :D

I've since made some more optimizations to the device code that has me just under 50 KB/sec. I don't think it'll get any faster without modifying the filesystem to ask for more than 512 bytes, and using the multiple block read command instead of the single block read.

Beta 5 is about 30KB/sec, by comparison, so I added a bit more than a 50% speed improvement to beta 6, which may be out later today or tomorrow.

Graz
Very interested
Posts: 81
Joined: Thu Aug 23, 2007 12:36 am
Location: Orlando, FL

Post by Graz » Mon Dec 07, 2009 9:39 pm

Yup, missed that post. Beta 4 lasted what, 3 hours. :shock: Good to hear you're making progress on the performance. I'm pretty tempted to go out and get one of these things just to play around with this.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Dec 07, 2009 10:39 pm

It's expensive, but if you can afford it, it's the flash cart to have right now. The stock Neo Myth comes with a 512Mbit flash cart (I here the next batch come with a 256Mbit cart - not sure if they'll also drop the price), 8 MB of built in ram, an EEPROM, and a YM2413 for SMS games. SMS games are played straight from the flash. MD/32X games are copied from the flash into the ram and played from there.

If you then get a Neo2-SD cart to plug into the Neo Myth in place of the flash cart, you also get an SD card interface (the Neo2-SD also has 256Mbit of flash, so you don't lose the ability to run things from flash). Right now, my menu can run MD and 32X games from the SD card. Still trying to get SMS games working from the SD card.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Dec 08, 2009 10:24 pm

Time for beta 6. Speed is 50% faster than beta 5. It also is a little more thorough on determining the file info, distinguishing between MD and 32X, and setting the run mode. Still doesn't run SMS from the stick.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Dec 11, 2009 5:58 pm

Beta 7 released. Fixed problem setting save ram - for those who claimed the save ram caused things to fail, you weren't crazy. It was all my fault - I was setting the wrong registers.
:oops:

So now you can play Sonic 3 with save ram again. When running from the SD card, remember that the only way to set the save ram settings is from the Options Screen. High-lite the rom and then press A, scroll down to the Save RAM Size and press C to set the size, then scroll down to the Save RAM Bank and press C to set the bank. Then press B to run.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Dec 11, 2009 8:38 pm

Okay, beta 8 is up. This release always gets the info when you select a rom with the dpad, so button C now does an alternate Run instead of Info. Pressing B runs the rom with the reset mode set to Reset-to-Menu, while pressing C runs the rom with the reset mode set to Reset-to-Game.

I also thought of something - when I made my progress bar, I added a sync to the vertical blank in the load routines to keep the bar from flickering. However, on a 4MByte rom, that adds almost 9 seconds to the load! I've disabled that, so the progress bar flickers during load, but you save a significant amount of time. Loading from flash is almost twice as fast on large roms, and from SD the time for 4MBytes dropped from 85 seconds to 76 seconds.

LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH » Sat Dec 12, 2009 1:44 am

Chilly Willy wrote:I also thought of something - when I made my progress bar, I added a sync to the vertical blank in the load routines to keep the bar from flickering. However, on a 4MByte rom, that adds almost 9 seconds to the load! I've disabled that, so the progress bar flickers during load, but you save a significant amount of time. Loading from flash is almost twice as fast on large roms, and from SD the time for 4MBytes dropped from 85 seconds to 76 seconds.
Perhaps you could spare a byte of RAM? Have the loading routine update it as necessary with a percentage value (obviously doesn't have to be 0-100, can be whatever you need to ease the implementation) and then have a small vsync routine that reads that value and updates the progress bar (if it doesn't break your load code to make use of Vints in such a way).

Post Reply