Author Topic: Next GBOS 3.x firmware and GB Pocket power issues.  (Read 13973 times)

0 Members and 1 Guest are viewing this topic.

Offline Kentoo

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Next GBOS 3.x firmware and GB Pocket power issues.
« on: January 13, 2016, 08:10 PM »
First of all THANK YOU for creating this !
I am software engineer, and I love this cartridge for creating homebrew games on my spare time.

Like others on this forum, I experienced some issues while powering my GB Pocket with two Eneloop Low Self Discharge AAA batteries.
Everdrive GB constantly resets on a Gameboy Pocket : http://krikzz.com/forum/index.php?topic=1972.0
Everdrive gb issue : http://krikzz.com/forum/index.php?topic=1561.5
Game Boy Pocket and Everdrive play well together? : http://krikzz.com/forum/index.php?topic=2886.5

First question, would you accept to open the source code of GBOS.GB to the community ?
If you can't for private or commercial reasons, could you consider theses remarks :

1 - Disable all sound circuits.

I am pretty sure that the sound circuit is ON when we choose an homebrew rom and flash it (Load and start).
Pandocs mentions that GB power consumption drops by 16% or more if sound circuits are disabled.
Before annoying you, I check the GBOS.GB ASM codes and I didn't find any sequences similar to ASM commands below.

To disable all sound circuits, you have to set 0 on $FF26 register:
XOR A
LDH ($26),A ; Disable sound circuits
 
2 - Disable the screen during the ROM flash sequence.

When you use Everdrive GB for the first time, it is worth mentioning that you don't have to switch OFF the GB
when this screen is showing "!!! DO NOT TURN OFF !!!". You can see dots during the flashing process : OK

After some rounds, you figure out that the screen : "!!! DO NOT TURN OFF !!!" will be displayed until the next restart.
I guess that during this part the GB processor does nothings, and all the stuff is done by the controller in the cartridge.

My suggestion is to add an option for MGB's owners. With this option, we could enable or disable the screen during the flashing process,
which give more current to Everdrive GB.
We just have to wait the next VBLank, disable the screen ($FF40), disable interrupt and Halt the processor.

Do you think it will be possible to make it ?

I wish you a nice day,
Best regards,
Kentoo

Offline skylar

  • Predator
  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #1 on: January 14, 2016, 09:32 AM »
hmm those are some nice ideas, i love the MGB myself, i have 3 mint condition ones and i always use my EDGB on these. i have an AGS-101 gba sp aswell but it's not the same :p.
mysel, i get fairly good results with eneloops even tho i have to turn of the screen with the contrast wheel after a few flashes or it will go in a bootloop. anyway, succes and i hope you succeed :)

Offline Kentoo

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #2 on: January 19, 2016, 09:49 AM »
Hi,

I did it by myself !
It's just small changes in the official GBOS.GB v3 image.
 
I assume no responsibility or liability arising from any error in or omission of information or from the use of any information or advice contained within this custom GBOS.OS version.

This version disables sound circuits.

I know that the ROM's program starts at $100 address. So I figured out that it's jump to a piece of code initializing some registers.
This part started at $0280 address like this :
    RST $38    ; $027d
    RST $38    ; $027e
    RST $38    ; $027f
    DI         ; $0280
    LD SP,$dff0; $0281
    LD C,A     ; $0284
    LD A,$00   ; $0285
    LD ($FF00+$ff),A; $0287
    LD ($FF00+$41),A; $0289
    LD A,$80   ; $028b
 
I inserted this instruction LDH ($26),A to disable sound circuits, like this :

    ; RST $38    ; $027e
    ; RST $38    ; $027f
    ; NEW ADRESS $027e

    DI         ; $0280
    LD SP,$dff0; $0281
    LD C,A     ; $0284
    LD A,$00   ; $0285
    LD ($FF00+$ff),A; $0287
    LD ($FF00+$41),A; $0289

    LD ($FF00+$26),A; DISABLE SOUND CIRCUITS

    LD A,$80   ; $028b

As LDH instruction occupies two bytes, I have to remove two RST $38 instructions.
And You have to replace all jumps or call to $0280 address by the new one $027e.
I did it at lines :

    ; OLD : JP $0280   ; $0000
   JP $027e

    ; OLD : JP $0280   ; $0100
   JP $027e

    ; OLD : JP $0280   ; $039d
   JP $027e   ; $039d

For now, it's working on my GB Pocket... and we will see how it works.
What do you think about it? Do you see any improvements?

Kentoo

Note : GBOS.GB file with md5 0c935f6bc217fcdc7e031cc4d64fb9bb is my modified version.

http://s000.tinyupload.com/?file_id=20876312868836216585

http://www.dotmatrixgame.com/downloads/GBOS.zip
« Last Edit: November 26, 2016, 09:13 AM by Kentoo »

Offline skylar

  • Predator
  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #3 on: January 19, 2016, 01:21 PM »
nice, one i will try it out tonight when i get home from work and report back to you

Offline KRIKzz

  • Administrator
  • Hero Member
  • *****
  • Posts: 3356
  • Karma: +503/-2
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #4 on: January 27, 2016, 01:58 PM »
Thanks for this idea, i will implement it in next OS update!

Offline Unkwar

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #5 on: February 29, 2016, 10:53 PM »
Hello,

I'm very interested by this modified OS to solve GBP issues.

But due to my poor english level, I don't understand everything on the post under : Is this firmware disable sound circuit once for all (so we play without any sound) or just during loading and in the menu?

And if I try this FW, after will I be able to re-flash my EDGB with the original FW again?

Many thanks for your explanations.

By the way, great job guys, despite my little problem, I'm so glad of my cartridge.

Offline trekeyus

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +6/-0
    • View Profile
    • my soundcloud
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #6 on: March 02, 2016, 12:23 AM »
As with all mods to everdrive os there is a bit of risk involved but it should be easily reversible. The act of turning off the sound circuits is only in the menu and something at almost every game dose as often as it can to save battery life. The act of  setting 0 on $FF26 register can save a significant amount of battery life. If the mod dose not work for you simple delete it and you will be back to the original os.
Chaos reigns within - Reflect, repent and reboot - Order shall return

Offline marillmau5

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #7 on: May 02, 2016, 08:10 AM »
Tested and it makes the game flicker a lot during pokemon battles, specifically tested in pokemon red ++ hack.
Its because its lowering the light or brightness when its flashing but i guess the game or hack uses those mechanics.
tested on gbc front light and gb pocket backlight.

anyways thanks but going back to official 3.0 version

Offline Renegade_R

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #8 on: November 14, 2016, 03:37 AM »
I know I am resurrecting this topic but would anyone have the modified firmware with the Sound Circuits  disabled?  The link with the firmware expired and I am wondering if I it can be re-posted here.

Thanks!

Offline TheShadowRunner

  • Full Member
  • ***
  • Posts: 141
  • Karma: +9/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #9 on: November 24, 2016, 10:35 AM »
+1, I'd like to try the modified firmware as well (until KRIKzz releases a new update officially) but file was deleted.

Offline skylar

  • Predator
  • Newbie
  • *
  • Posts: 28
  • Karma: +3/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #10 on: November 25, 2016, 12:17 PM »
for everybody who want's to grab the modified GBOS file. i still have it.

https://ufile.io/5ce23

link will be active for 30 days (free user)

as stated by OP the md5 = 0c935f6bc217fcdc7e031cc4d64fb9bb you can check it with Md5Checker :)

enjoy

Offline TheShadowRunner

  • Full Member
  • ***
  • Posts: 141
  • Karma: +9/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #11 on: November 25, 2016, 12:38 PM »
Thanks skylar, much appreciated  8)
Edit: just finished testing, this is a major enhancement over the official firmware, I've had 0 reboots so far when erasing/flashing ROMs. I'm on GB Pocket and with official firmware + batteries, the EDGB is almost unusable (power cycle loops). Excellent job Kentoo  :)
« Last Edit: November 25, 2016, 01:20 PM by TheShadowRunner »

Offline Kentoo

  • Newbie
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #12 on: November 26, 2016, 09:23 AM »
I just finished reading your feedbacks. Thanks so much for all your comments !

I put original archive on my website (not finished yet) :
http://www.dotmatrixgame.com/downloads/GBOS.zip

Offline Jegriva

  • Full Member
  • ***
  • Posts: 126
  • Karma: +3/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #13 on: February 20, 2018, 02:55 PM »
Thanks for this idea, i will implement it in next OS update!

I don't think this has never ben asked or adressed, even when the classic Everdrive GB is now out of production since several months, but does the OS v4 have these battery-saving features?

Offline highfro

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Next GBOS 3.x firmware and GB Pocket power issues.
« Reply #14 on: March 07, 2018, 10:34 PM »
You can try doing the 5V regulator mod following these instructions

https://imgur.com/FBYejzZ

and cutting pin 6 ( 5V VDD ) from daughter to mainboard

I'm able to get my rev A to boot every time on my GBP and also am able to flash roms!

this is including a backlight and bivert mod