Author Topic: Neo Myth Menu beta  (Read 8764 times)

0 Members and 1 Guest are viewing this topic.

Offline madmonkey

  • Moderator
  • Full Member
  • *****
  • Posts: 174
Re: Neo Myth Menu beta
« Reply #90 on: December 11, 2009, 07:39:02 PM »
The tricky part is 24/32Mbit + save: they overlap at 0x200000. If the save is active and the game tries to use rom around 0x200000, it will fail. Roms bigger than 2MB that have save ram have to be hacked so that when they aren't saving, they switch the run mode to 4, and only switch to 6 when they need to save. I think they could also set the save ram size to 0 when not saving, and to the proper size when saving, leaving the mode as 6. Seems that should also work. The point is that just setting the save ram on with a rom larger than 2 MB means it WILL fail at some point without patching.
if it's true, that sucks. (any takers to complete ps4 to the end :) ? ) isn't myth hardware(and not software) supposed to handle that? afaik tototek handles this in hardware, so why not myth?

ROM + save ram: up to 16Mbit is 1, up to 24 Mbit is 2, and up to 32Mbit is 6. 5 is ROM + EEPROM. 4 is up to 32Mbit w/o save. 3 is 32X + save ram.
are you sure? I though ROM + save ram: up to 16Mbit is 1, up to 32 Mbit is 2,  6 is up to 32Mb without save, 4 is 40mb ssf2 (with banking) .
sonic3&k (the only 32Mb md rom with save) works with 2(I should check if it works with 6 saves and all, just in case).
if I'm not mistaken, that should do for md roms(and it seems 32x and sms will work with their respective types without any additional checks, there is no 32x/sms without save types):

int selectRunMode(int psize, int bsize, int run)
{
    switch(run)
    {
        case 1:
        case 2:
        case 4:
        case 6:
            if(psize>0x400200)
            {
                return 4;
            }
            if(gSRAMType)
            {
                return 5;
            }
            if(bsize==0)
            {
                return 6;
            }
            else
            {
                if(psize<=0x200200)
                {
                    return 1;
                }
                else
                {
                    return 2;
                }
            }
        case 3:
            if(gSRAMType)
            {
                return 5;
            }
    }
    return run;
}

meant to be called like that:

neo_run_myth_psram(fsize, bbank, bsize, selectRunMode(psize, bsize, runmode));

and btw, can we have sram size and bank selection for sms?
« Last Edit: December 11, 2009, 08:24:08 PM by madmonkey »

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1491
  • Just a coding machine.
Re: Neo Myth Menu beta
« Reply #91 on: December 11, 2009, 08:04:01 PM »
I don't think SMS games have save ram. Although the code to start up SMS games call the save ram routine, the only thing I've ever seen is bsize=bbank=0, i.e., no save ram. I'm not even sure how that would work in run mode 0x13. I know the save ram is mapped to 0x200000 in MD/32X modes, but not the faintest clue what happens in SMS mode... not even sure what the SMS memory map looks like.
 ???

Although the Neo Myth does SSF2 bank selection on the PSRAM, it apparently doesn't do the SSF2 save ram control. The SSF2 that runs on the Neo Myth is patched so that when the game calls the SSF2 sram enable/disable, it instead switches between mode 4 (disabled), and mode 6 (enabled). The TotoTek MD-Pro actually does the SSF2 save ram enable/disable, so it doesn't need patching.

It's funny that people call it the SSF2 bank selection and save ram control. It was a SEGA dev cart that actually defined those controls. People refer to it as the SSF2 controls because it was the only game to actually use them. Anywho, we need to make a list of games that need patching. I can help make patches, but only if I know what games to look at.
 ::sm-22.gif::

Offline madmonkey

  • Moderator
  • Full Member
  • *****
  • Posts: 174
Re: Neo Myth Menu beta
« Reply #92 on: December 11, 2009, 08:28:23 PM »
I don't think SMS games have save ram.
but it definitely works in ps1.

Although the Neo Myth does SSF2 bank selection on the PSRAM, it apparently doesn't do the SSF2 save ram control. The SSF2 that runs on the Neo Myth is patched so that when the game calls the SSF2 sram enable/disable, it instead switches between mode 4 (disabled), and mode 6 (enabled). The TotoTek MD-Pro actually does the SSF2 save ram enable/disable, so it doesn't need patching.
err, does ssf2 have sram? kega doesn't know anything about it apparently, is it an error in the emulator then? if it's patched though, that explains why it doesn't run without master code.

Offline King Of Chaos

  • Full Member
  • ***
  • Posts: 115
Re: Neo Myth Menu beta
« Reply #93 on: December 11, 2009, 09:18:01 PM »
err, does ssf2 have sram? kega doesn't know anything about it apparently, is it an error in the emulator then?

I don't think Steve Snake would overlook such a thing. I suppose I can ask him about it next time I speak to him.

Offline mic_

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 562
Re: Neo Myth Menu beta
« Reply #94 on: December 16, 2009, 09:02:44 AM »
Any particular reason why the linker script isn't included with the source code? I want to rebuild the sources to test something, and your crt0 apparently needs a different linker script from the one I'm using.

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1491
  • Just a coding machine.
Re: Neo Myth Menu beta
« Reply #95 on: December 16, 2009, 10:27:21 AM »
Any particular reason why the linker script isn't included with the source code? I want to rebuild the sources to test something, and your crt0 apparently needs a different linker script from the one I'm using.


Linker scripts are part of the toolchain, not the app. You'll find both the MD and the 32X linker scripts in the libs directory of my toolchain, which has been post here and elsewhere.

Here it is again: gendev20091130.7z

This is a linux toolchain using the 680x0 compiler from uclinux (4.1.2) as well as the latest SH compiler from KPIT.

I'll probably post an update to this with more libs in my SDK in the next week or two. In the meantime, this toolchain is what I use (in Xubuntu 9.04) to compile the menu as well as Wolf32X.

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1491
  • Just a coding machine.
Re: Neo Myth Menu beta
« Reply #96 on: December 16, 2009, 07:54:17 PM »
I've added the ability to recognize the "MYTH" info in binary files converted by Conle's plugin. I also added the ability to recognize and load SMD files from the SD card. I can't do that with the flash for two reasons: first, I don't have the code space for it; second, writing an SMD rom to the flash makes it take up a LOT more space in the flash. A 16Mbit game takes 24Mbits of space in the flash, just because of that 512 byte header. I think we should just leave the flash as binary files only. If you want to run SMD files, do so from the SD card.

Seeing as Conle's matching plugin isn't out yet, I'm waiting for that, then doing a little more testing. The I'll post the v1.1 beta 1 of the menu.
 ::sm-24.gif::

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2095
Re: Neo Myth Menu beta
« Reply #97 on: December 16, 2009, 11:32:29 PM »
Great work  ::sm-08.gif:: !, i'll try to upload the new revision of the plugin today  ~sm-42.gif~.

Oh and the menu compiles fine on ubuntu 9.10 x64 too. 8)
« Last Edit: December 16, 2009, 11:35:58 PM by Conle »

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1491
  • Just a coding machine.
Re: Neo Myth Menu beta
« Reply #98 on: December 17, 2009, 12:05:23 AM »
Great work  ::sm-08.gif:: !, i'll try to upload the new revision of the plugin today  ~sm-42.gif~.

Oh and the menu compiles fine on ubuntu 9.10 x64 too. 8)

I compile on 9.04, so I don't think there would be any problems. They aren't that far apart.
 8)

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2095
Re: Neo Myth Menu beta
« Reply #99 on: December 17, 2009, 01:01:43 AM »
Yes the only thing that one would need to compile on x64 machine is to download x86-combatible libraries.The version is a minor factor.

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1491
  • Just a coding machine.
Re: Neo Myth Menu beta
« Reply #100 on: December 17, 2009, 01:21:42 AM »
Yeah, kinda hard to run 64 bit programs on a 32 bit PC.  ::sm-05::