Author Topic: 128kB SRAM incorrectly set as 32kB  (Read 4339 times)

0 Members and 1 Guest are viewing this topic.

Offline ISSOtm

  • ASM programmer
  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
  • Mid-scanline rastersplits FTW!
    • View Profile
    • My Little Website
128kB SRAM incorrectly set as 32kB
« on: June 07, 2018, 12:06 PM »
Hello!

I'm currently developing a game for the GBC, called Aevilia. I've been using the BGB emulator as my primary development+testing platform, but I wanted to try it on hardware as well.
The game uses a 128kB SRAM, and thus I bought an EverDrive GB X5 (it was still rev. A when I did), since it's advertised as supporting such large SRAM. Unfortunately, and unlike BGB, the X5 doesn't grant the game its 128kB, instead acting as if it was 32kB.
The game detects the 32k only SRAM and switches to a fallback mode, but it's annoying. Is it a problem with my cart? Or did I do something wrong? The cart was advertised as supporting 128k SRAM, so I was expecting my game to not need that fallback anymore.

The ROM can be found here, and the detection-performing code can be found there. (Basically checks if SRAM wraps at 32k, ie. bank 4 == bank 0)

Thanks for helping!
Currently programming a game for the GBC in ASM.
Wanna try it? https://eldred.fr/aevilia.html !

Offline Marteicos

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +15/-0
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #1 on: June 07, 2018, 04:37 PM »
I can't help with your problem but I want to mention that the x3 also supports 128kB saving. From a development point of view the x5 was a better choice still (less hassle by not having to press the reset to store the save game) check the submenu before loading a rom (pressing a once), what save size the Everdrive reports there?

The x3 operates like the Mega Everdrive x3.

Offline ISSOtm

  • ASM programmer
  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
  • Mid-scanline rastersplits FTW!
    • View Profile
    • My Little Website
Re: 128kB SRAM incorrectly set as 32kB
« Reply #2 on: June 07, 2018, 04:43 PM »
I see `RAM SIZE: 32K`. Definitely not normal, the game's header correctly reports 128k.
Currently programming a game for the GBC in ASM.
Wanna try it? https://eldred.fr/aevilia.html !

Offline TheShadowRunner

  • Full Member
  • ***
  • Posts: 142
  • Karma: +9/-0
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #3 on: June 07, 2018, 09:46 PM »
Checked here as well.
Krikzz is needed!

Offline bogaman

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #4 on: June 11, 2018, 08:53 PM »
I've noticed problems with Game Boy Wars 3 (a 128kb save game). This game works fine in other carts that truly support 128kb saves. Thanks for this post, I hope this flaw gets fixed.

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3364
  • Karma: +505/-2
    • View Profile

Offline TheShadowRunner

  • Full Member
  • ***
  • Posts: 142
  • Karma: +9/-0
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #6 on: June 12, 2018, 03:07 PM »
Code: [Select]
GBC-OS-v1.03 12.06.2018
1)Fixed save size detection for games with 128K sram
Thank you!

Offline ISSOtm

  • ASM programmer
  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
  • Mid-scanline rastersplits FTW!
    • View Profile
    • My Little Website
Re: 128kB SRAM incorrectly set as 32kB
« Reply #7 on: June 12, 2018, 03:24 PM »
I have yet to test if the SRAM has the correct amount of banks software-wise, but at least both my 128k (and 64k, as a bonus!) SRAM'd ROMs display the correct info in the "Rom Info" screen. Thank you!

[EDIT]
Well, the good news is that 64k saves should work properly (though I haven't tested yet). The sad news is that my 128k SRAM'd ROM only obtains 64k (it doesn't detect 32k, but file 1 [banks 4-7] is linked to file 3 [banks C-F], implying only half the SRAM is available).
I didn't check yet if a 64k'd ROM would get 32k of SRAM, or the full 64k. Will do that now.

[EDIT2]
My 64k'd ROM didn't trigger the 32k detection, so it's only a 128k bug.
« Last Edit: June 12, 2018, 08:41 PM by ISSOtm »
Currently programming a game for the GBC in ASM.
Wanna try it? https://eldred.fr/aevilia.html !

Offline migles

  • Jr. Member
  • **
  • Posts: 81
  • Karma: +2/-0
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #8 on: June 13, 2018, 08:38 PM »
http://krikzz.com/pub/support/everdrive-gb/x-series/OS/GBC-OS-v1.03.zip
really nice it took just 1 week to throw a fix for this guy who is trying to make a game work with your product :D

@ISSOtm i will look forward to play your game in my evgbx7 when its finished, really hope you can get a fix for your issue!

Offline butfluffy

  • Hero Member
  • *****
  • Posts: 878
  • Karma: +46/-8
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #9 on: June 14, 2018, 02:06 AM »
i have an old everdrive gb from when it was first released and before the x naming of everdrives.
 is this OS update v1.03 compatible with the old gb everdrive or only for x series?

Offline Localhorst86

  • Full Member
  • ***
  • Posts: 183
  • Karma: +12/-0
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #10 on: June 14, 2018, 09:50 AM »
i have an old everdrive gb from when it was first released and before the x naming of everdrives.
 is this OS update v1.03 compatible with the old gb everdrive or only for x series?
Only the x-series.

Note that the original EDGB does not support 128k saves at all. While the SRAM chip apparently is 1Mbit (128k), part of it is used by the system and not accessible to games.

Offline ISSOtm

  • ASM programmer
  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
  • Mid-scanline rastersplits FTW!
    • View Profile
    • My Little Website
Re: 128kB SRAM incorrectly set as 32kB
« Reply #11 on: June 15, 2018, 12:53 PM »
@ISSOtm i will look forward to play your game in my evgbx7 when its finished, really hope you can get a fix for your issue!
Well, I'm working on a re-write, which currently only uses 64k SRAM. Glad to hear people are interested!
Currently programming a game for the GBC in ASM.
Wanna try it? https://eldred.fr/aevilia.html !

Offline butfluffy

  • Hero Member
  • *****
  • Posts: 878
  • Karma: +46/-8
    • View Profile
Re: 128kB SRAM incorrectly set as 32kB
« Reply #12 on: June 16, 2018, 03:29 AM »
i have an old everdrive gb from when it was first released and before the x naming of everdrives.
 is this OS update v1.03 compatible with the old gb everdrive or only for x series?
Only the x-series.

Note that the original EDGB does not support 128k saves at all. While the SRAM chip apparently is 1Mbit (128k), part of it is used by the system and not accessible to games.

i'm planing on upgrading to x7 version for save state support in the near future anyhow so no real problem.
thanks for the reply.