Author Topic: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]  (Read 23684 times)

0 Members and 1 Guest are viewing this topic.

Offline Dr.neo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3826
MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« on: December 09, 2009, 12:13:08 AM »
MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]


* Fixed some bugs,
* Now can choose the install path when you run the install pack
* Support clone's the lastest MD Myth plug-in  :)
* The SNES part finish 100% already, and N64 part finish 80%
* Build in the new MD Myth menu, thanks for ChillyWilly  ~sm-42.gif~






download:  http://www.neoflash.com/myth/NEO2UltraMenuV2_93AppSetup091207_rar.zip
« Last Edit: December 09, 2009, 12:18:31 AM by Dr.neo »
In my world,have 0 and 1 only ......Matrix World......

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #1 on: December 09, 2009, 12:27:42 AM »
Dr.Neo , i have uploaded the new version(v2.0.0.2) just a few minutes ago ->
http://www.neoflash.com/forum/index.php/topic,5812.msg42079.html#msg42079

It also supports CD-SRAM.bin & CD-System.bin , and also includes a tool to generate these files!
 ~sm-42.gif~

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1751
  • Just a coding machine.
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #2 on: December 09, 2009, 04:32:28 AM »
A few things I've noticed so far:

1 - Despite being assured that 3 is the correct run mode for 32X, the app never writes this. I get 2 and 6, depending on the size of the rom. The rom type IS set to 32X, so the app knows these are 32X roms!

2 - The SCD_System generated a run mode of 9, and the SCD_Ram generated a run mode of 8. Aren't they supposed to be 10 and 9, respectively?

3 - The app STILL puts the first rom at 0, even though this is the same place written over by the USB transfer. The app needs to start at 0x400000, not 0.

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #3 on: December 09, 2009, 05:31:56 AM »
I can answer #1,#2 :

#1:
The plugin detects 32x(and codename MARS) roms , i don't know about the programmer but if you test it with supermdplugHost.exe you will see that it prints the correct format.Maybe its still the same bug in the programmer that doesn't write this flag.


#2 :

Please use this enum table ->

Code: [Select]
typedef enum NEOMD_RomFormat
{
   NEOMD_FMT_UNKNOWN = -1,
   /*SKIP ZERO - GBA CART BUS RESERVED -*/
   NEOMD_FMT_MD_1_16_S = 0x01,      //1-16mbit MD rom length  with save
   NEOMD_FMT_MD_17_32_S,         //17-32mbit MD rom length  with save
   NEOMD_FMT_32x_S,             //32x rom with save
   NEOMD_FMT_MD_40,            //40mbit MD rom length
   NEOMD_FMT_MD_32X_EEPROM,   //MD or 32x with eeprom == 24c01
   NEOMD_FMT_MD_1_32_NOS,        //1-32mbit MD rom length without save
   NEOMD_FMT_SCD_BIOS,          //sega cd bios
   NEOMD_FMT_SCD_SRAM,         //sega cd sram
   NEOMD_FMT_SCD_SYSTEM,       //sega cd system
   NEOMD_FMT_SMS = 0x13         //sega master system rom
};

It is used both by the plugin & programmer.

And download v2.0.0.2 version of the plugin , because the package has the old v2.0.0.1 which cannot recognize SCD SRAM ,& SCD BIOS + SRAM cart.

Download link for the new plugin  ->
http://www.neoflash.com/forum/index.php?action=dlattach;topic=5812.0;attach=2250

 :-\ :)
« Last Edit: December 09, 2009, 05:39:45 AM by Conle »

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1751
  • Just a coding machine.
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #4 on: December 09, 2009, 06:09:13 AM »
I was using the 2.0.0.2 stable. By the way, the SCD stuff probably isn't working because that enum table is wrong - the CD values should be 8 to 10, not 7 to 9.

Offline MitchO

  • Newbie
  • *
  • Posts: 28
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #5 on: December 09, 2009, 06:59:53 AM »
I'm assuming this is supposed to be December 8 not October 8?

Mitch

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #6 on: December 09, 2009, 08:13:51 AM »
I was using the 2.0.0.2 stable. By the way, the SCD stuff probably isn't working because that enum table is wrong - the CD values should be 8 to 10, not 7 to 9.


Ah ~sm-34.gif~
I will provide a quick fix in few hours , hopefully ShivenYu will update the enum table soon.

I will post more info(&the new enum table) in SuperMD plugin's release thread.

Edit->
Here -> http://www.neoflash.com/forum/index.php/topic,5812.msg42091.html#msg42091
« Last Edit: December 09, 2009, 08:20:02 AM by Conle »

Offline SivenYu

  • Neo MOD
  • Jr. Member
  • *
  • Posts: 95
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #7 on: December 09, 2009, 02:52:38 PM »
I can answer #1

#1:
The plugin detects 32x(and codename MARS) roms , i don't know about the programmer but if you test it with supermdplugHost.exe you will see that it prints the correct format.Maybe its still the same bug in the programmer that doesn't write this flag.


That's because the programer will finnal check these 3 type for the save flag, even the plugin return but if limited by sram and can't allocate save, then will modify the type. code like this:

// check whether it realy has a save flag
if(bSave == FALSE)
{
   if(    (pVerify[6] == NEOMD_FMT_MD_1_16_S) ||
      (pVerify[6] == NEOMD_FMT_MD_17_32_S) ||
      (pVerify[6] == NEOMD_FMT_32x_S))
   pVerify[6] = NEOMD_FMT_MD_1_32_NOS;// changed to no save if so
}

Is it no necessary to do this? i will disable this if so.

Offline SivenYu

  • Neo MOD
  • Jr. Member
  • *
  • Posts: 95
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #8 on: December 09, 2009, 03:04:58 PM »

3 - The app STILL puts the first rom at 0, even though this is the same place written over by the USB transfer. The app needs to start at 0x400000, not 0.


excuse me, ChillyWilly,  i am not understand why to start at 0x400000.

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #9 on: December 09, 2009, 06:49:12 PM »
That's because the programer will finnal check these 3 type for the save flag, even the plugin return but if limited by sram and can't allocate save, then will modify the type. code like this:

// check whether it realy has a save flag
if(bSave == FALSE)
{
   if(    (pVerify[6] == NEOMD_FMT_MD_1_16_S) ||
      (pVerify[6] == NEOMD_FMT_MD_17_32_S) ||
      (pVerify[6] == NEOMD_FMT_32x_S))
   pVerify[6] = NEOMD_FMT_MD_1_32_NOS;// changed to no save if so
}

Is it no necessary to do this? i will disable this if so.

How about changing to this ->
Code: [Select]

if (pBlock->saveAllocationSize>0) //-1 = EEPROM , dont bother here. 0 = no save ..dont bother too
{
    bool save = true;

    if ( !(cart->flags & CAN_SAVE_TO_SRAM) )//example
    {
if(cart->bits[freeSram] + MB(pBlock->saveAllocationSize)  > cart->bits[totalSRam])
   save = false;
    }
    if(!save)
    {
            Show warning message to user
            Disable save for this rom
    }
    else Write with save;
}
else if(pBlock->saveAllocationSize == -1)
{
    bool save = true;

    if ( !(cart->flags & EEPROM_STATUS) )//example
    {
        Show warning message to user that EEPROM is filled

        MESSAGEBOX : Ask user if wants to reset EEPROM.
        if(result == ID_YES)
save = true;
    }
    if(save)
    {
        reset eeprom
        assign eeprom to this rom
        write rom
    }
    else Disable save for this rom
}
else if(pBlock->saveAllocationSize == 0)
    writeWithout checks;
« Last Edit: December 09, 2009, 06:51:22 PM by Conle »

Offline kuroiso

  • Newbie
  • *
  • Posts: 48
    • NewPark Boys
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #10 on: December 09, 2009, 06:51:10 PM »
The New MD Myth Menu is great!
Protecting Mrs. Ai Suotome

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1751
  • Just a coding machine.
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #11 on: December 10, 2009, 01:06:49 AM »
excuse me, ChillyWilly,  i am not understand why to start at 0x400000.

There's a "USB Transfer" mode to the Neo Myth: while the Neo Myth is plugged into the MD, you can turn on the USB controller and then send a file from the PC to run immediately. This file is written to 0, with a maximum size of 4MB. Once you've transferred the file from the PC, the Neo Myth menu then runs whatever was uploaded to 0 as if it were a MD rom. This has been in the menu since the very beginning. Here's the relevant code from the very first menu from Dr Neo.

Code: [Select]
               CMP.B   #$80,d0   ;    START
                BEQ     RUN_X4
                NOP

                Jmp     MENU

RUN_X4:
                lea      MAKE30(PC),a0  ;BBBB
                JSR      PRINTA
                JSR      wjoy
                MOVE.W   #$FFFF,D0
                MOVE.W   D0,USB_ON


RUN_X4A:
                jsr     rjoy
                NOP
                CMP.B   #$20,d0    ;    C
                BEQ     RUN_X5
                NOP
                NOP
                NOP
                NOP
                JMP     RUN_X4A

RUN_X5:

                lea      MAKE13(PC),a0  ;BBBB
                JSR      PRINTA
                JSR      wjoy
                MOVE.W   #$0000,D0
                MOVE.W   D0,USB_ON
                NOP
                NOP
                NOP
                NOP
                NOP
                NOP
                MOVE.B   #$00,MODE
;*******************************************************************************
                MOVE.B   #$0B,ROM_Z        ;
                MOVE.B   #$00,RBK_H        ; A24~A25
;*******************************************************************************
                MOVE.B   #$00,RBK_L
;*******************************************************************************
                MOVE.B   #$01,SR_Z;        ; GBA SRAM SIZE
                MOVE.B   #$00,SR_B         ; GBA SRAM BANK
;*******************************************************************************
                MOVE.B   #$06,RUN
;*******************************************************************************
                JMP      MD5

When you pressed START, it turns on the USB and waits for the user to press C. During this time, they use the LINK feature in the Windows app to write a file to location 0. Once done, they press C and the menu jumps to the MD routine with the rom offset set as 0 (RBK_L and RBK_H both set to 0).

So clearly, the flash from 0 to 0x3FFFFF needs to be reserved or the first time someone uses the Link feature they will overwrite one or more roms (think if they had SMS roms in the flash - they could overwrite DOZENS of roms).

So there's three options here that I see: one, reserve the flash from 0 to 0x3FFFFF and keep everything else as it is; two, change the link function to write to a different location than 0 and change the menu to match it; or three, remove the link feature from both the app and the menu.
 ::sm-09.gif::

EDIT: The simplest way I can think of to reserve the space is when you format the Neo Myth, immediately add one menu entry that has a name like "USB Link" that is marked as starting at 0 and being 4MB long.
« Last Edit: December 10, 2009, 01:10:59 AM by ChillyWilly »

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #12 on: December 10, 2009, 01:24:53 AM »
ChillyWilly , just an idea :

How about checking the capacity of the flash/sd and check if :
AllocatedMb + USBReservedMb > MaxAvaliableMb
(AllocatedMb =
gSelections[gMaxEntry].offset +
gSelections[gMaxEntry].length)


If true , show a message that says something like : "Please reserve at least 4MB" for the USB buffer".

Otherwise :
Code: [Select]
Start copying at : AllocatedMbPointer

readUsbPacket(&length)
if(length <= 8Mb)
{
     readUsb(buffer,length)
     copy(location,address,buffer)
}
else
{
    for(i=0; i <length / XFERSIZE ; i++)
    {
         readUsb(buffer,XFERSIZE)
         copy(location,address,buffer)
   }
}
run param...

Or something similar.

But for this to happen , the programmer must be able to write more than 64KB to the menu flash...
« Last Edit: December 10, 2009, 01:43:00 AM by Conle »

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1751
  • Just a coding machine.
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #13 on: December 10, 2009, 02:01:21 AM »
Remember that the full capacity may not be available. The format command (not the fast one) finds bad blocks to mark as unavailable. When I do that on my 512M stick, 8M are not available as bad. I don't know where this info is stored, so it might not be possible for the menu to tell anything about the memory other than the menu entries.

Also, the menu doesn't control the USB transfer in any manner beyond turning the USB on or off. The PC controls the USB transfer.
« Last Edit: December 10, 2009, 02:03:08 AM by ChillyWilly »

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Re: MD 3in1 Myth flash cart PC programmer V2.93 [Oct.08 2009]
« Reply #14 on: December 10, 2009, 02:34:45 AM »
Remember that the full capacity may not be available. The format command (not the fast one) finds bad blocks to mark as unavailable. When I do that on my 512M stick, 8M are not available as bad. I don't know where this info is stored, so it might not be possible for the menu to tell anything about the memory other than the menu entries.

Also, the menu doesn't control the USB transfer in any manner beyond turning the USB on or off. The PC controls the USB transfer.


Ah , i see  ~sm-34.gif~.

Another idea : How about adding another "checkbox" in the programmer something like : "Write 4MB USB signature" and when its "on" the programmer will write:
At 0x000000 - 'U'
At 0x000001 - 'S'
At 0x000002 - 'B'
At 0x400000 - 'R'
Block division(s) with games

USB Reserved

otherwise:
Block division(s) with games

Then the menu could test this signature/cookie & if USBR signature found then allow USB transfer , otherwise print some message like : "Please enable USB mode in the Programmer's configuration section".

For 1 thing im not sure : If you can access addresses from the flash without copying anything.If you have to copy data , then this is not efficient.

If the app handles all the procedure then it might be easy to read these 4 bytes and then verify if "USB Signature" has been enabled by the user.
So you let the user decide whether 4MB will be reserved for USB flashing.
 :)

« Last Edit: December 10, 2009, 02:49:26 AM by Conle »