Hacking EzFlash Junior doesn't support Pocket Monsters Crystal Version

  • Thread starter Thread starter pfero
  • Start date Start date
  • Views Views 7,796
  • Replies Replies 18
  • Likes Likes 1

pfero

Member
Newcomer
Joined
Mar 3, 2020
Messages
21
Reaction score
36
Trophies
0
Age
57
XP
181
Country
Antarctica
Hi, I'm writing this as I'm experiencing issues with playing the japanese title, "Pocket Monsters Crystal Version". It doesn't seem to work correctly, because I'm experiencing glitches in relation to saving the data with this game.
For example, if you start the game as a girl, save the game, and restart, you'll find the following:
- You've become a boy (but blue)
- The Mystery Gift option is enabled in the main menu, which is usually unlocked much later in the game.
This is just a couple of the issues this game has on the flashcart, there's more but these are the easiest to notice right out of the gate.

Now, I've looked into the issue, so here's a bit of technical detail: Japanese Pokemon Crystal is the only game that uses an MBC30 mapper. This is reported in the cartridge header as an MBC3+TIMER+RAM+BATTERY (just like any other pokemon game), but, with an SRAM size value of 05h. This mapper works the same as an MBC3, except the ram bank number can range from 0 to 7, instead of 0 to 3. An extra pin is connected from the mapper to the SRAM on the cartridge's board as well. Additionally, the ROM bank number can range from 0 to 255, instead of 0 to 127 (Source, chapter 11, page 44), and while no released game uses this, some homebrew games do.
Currently, the EZFlash Junior ignores this bit. It correctly creates a 64KB save file on the SD card, but when the game accesses the save file, only banks 0 to 3 can be accessed. Accessing banks 4 through 7 will access the data in banks 0 to 3, which can lead to corruption.

Considering how other mappers such as the MBC5 are working on this flashcart and support much bigger ROM and SRAM sizes, I think it should be possible to support this game properly.
Can this game be fixed?
 
Last edited by pfero,
  • Like
Reactions: Ryccardo
I think the crystal jap issue already fixed in Kernel 1.01, if you look the changelog.

Otherwise you wouldn't have been the only one reporting on the problem for so long.
 
I should've specified, I'm running kernel 1.04e and the firmware identifies itself as FW4. I've tried reflashing with Update_FW4.gb and the problem persists.
 
Hi. I have same problem too, I'm running kernel 1.05e and FW5. It's not still solved.

Please, you handle this.
 
Hi. I have same problem too, I'm running kernel 1.05e and FW5. It's not still solved.

Please, you handle this.

The commit date of FW5RC is 20200731, the new crystal fix is 20200915

you have to wait the final release include SGB support and some RTC fix.
 
  • Like
Reactions: Ryccardo
Since it's been ages since this issue was raised, and a bit more research into the flashcart's protocol and internals was done by several people, I decided to make a patch for "Pocket Monsters - Crystal Version (Japan)" that bypasses the broken MBC30 emulation to use the flashcart's registers directly to write to the save data.

Attached is an IPS patch to apply this fix to the ROM. It's been tested on FW5, though I don't see why it wouldn't work on FW4.

SHA1 checksums:
Code:
c3c38f3fad2a589bcfd00a2dffe2670dd0c6efb5  Pocket Monsters - Crystal Version (Japan) (EZFlashJR Fix).gbc
95127b901bbce2407daf43cce9f45d4c27ef635d  Pocket Monsters - Crystal Version (Japan).gbc

And the rgbasm code that was used to make the patch:
Code:
SECTION "patch", ROM0[$2F9D]
OpenSRAM:
    push hl
    push af
    call EZFEnableSRAM
    pop af
    ld [$4000], a
    pop hl
    ret
    nop
    nop
    nop
    nop
    nop

CloseSRAM:
    push hl
    push af
    call EZFDisableSRAM
    pop af
    pop hl
    ret
    nop
    nop
    nop

SECTION "free", ROM0[$3F7F]

EZFDisableSRAM:
    xor a
    ld hl, $7FC0
    call EZFWrite
    xor a
    ld hl, $7F31
    call EZFWrite
    xor a
    inc l
    jr EZFWrite

EZFEnableSRAM:
    xor a
    ld hl, $7F31
    call EZFWrite
    ld a, $80
    inc l
    call EZFWrite
    ld a, $03
    ld hl, $7FC0

EZFWrite:
    push af
    ld a, $E1
    ld [$7F00], a
    inc a
    ld [$7F10], a
    inc a
    ld [$7F20], a
    pop af
    ld [hl], a
    ld a, $E4
    ld [$7FF0], a
    ret
 

Attachments

Actually, this problem happens in ANY rom bigger than 1024kb! That is so frustrating
 
The commit date of FW5RC is 20200731, the new crystal fix is 20200915

you have to wait the final release include SGB support and some RTC fix.
Hi !
Is it planned to release a stable Junior FW5 (or above) two years later ?
That's like idk at all where could be the actual development (mostly the same/really improved)

Thanks !
 
I have an EDGB, so I'm good for now... But I'd like to have this firmware issue fixed once and for all.
https://gbatemp.net/threads/ez-flash-junior-testflight.558875/page-55#post-9638149

This is the last test fw, not the original FW5 that bricked carts, but essentially a RC FW5.
I don't think we're getting any more updates for the Jr, after all the development struggling with RTC, a lot of focus being used to test the pocket and other non-standard gameboys and the batteries are dying quickly, resulting in a lot of returns, then there's been nothing but radio silence on updates from the EZ guys for a year.

Tested this update and it seems relatively stable, but it does have it's own issues and the cart is currently pretty dead, you're pretty much forced into buying GB X7 for 100% solid RTC or a custom flash cart made from a jp pokemon game.

The ez Jr likely stopped being profitable and profilerated with clones, so there's no dev incentive to continue improving it
 
  • Like
Reactions: Jayro and Reshiban
https://gbatemp.net/threads/ez-flash-junior-testflight.558875/page-55#post-9638149

This is the last test fw, not the original FW5 that bricked carts, but essentially a RC FW5.
I don't think we're getting any more updates for the Jr, after all the development struggling with RTC, a lot of focus being used to test the pocket and other non-standard gameboys and the batteries are dying quickly, resulting in a lot of returns, then there's been nothing but radio silence on updates from the EZ guys for a year.

Tested this update and it seems relatively stable, but it does have it's own issues and the cart is currently pretty dead, you're pretty much forced into buying GB X7 for 100% solid RTC or a custom flash cart made from a jp pokemon game.

The ez Jr likely stopped being profitable and profilerated with clones, so there's no dev incentive to continue improving it

I’ve seen some flash carts advertised as having an original chip, the chis flash I think. That was for gba tho. There are 16 dollar rtc carts with free shipping…surely they aren’t all harvested old stock?
 
https://gbatemp.net/threads/ez-flash-junior-testflight.558875/page-55#post-9638149

This is the last test fw, not the original FW5 that bricked carts, but essentially a RC FW5.
I don't think we're getting any more updates for the Jr, after all the development struggling with RTC, a lot of focus being used to test the pocket and other non-standard gameboys and the batteries are dying quickly, resulting in a lot of returns, then there's been nothing but radio silence on updates from the EZ guys for a year.

Tested this update and it seems relatively stable, but it does have it's own issues and the cart is currently pretty dead, you're pretty much forced into buying GB X7 for 100% solid RTC or a custom flash cart made from a jp pokemon game.

The ez Jr likely stopped being profitable and profilerated with clones, so there's no dev incentive to continue improving it
This is why I stick with the cheap EDGB clones for non-RTC games, and then buy dedicated RTC flash carts for my Pokemon Gen 2 games. I don't really mind cart swapping just to play Pokemon Gen 2.
 

Site & Scene News

Popular threads in this forum