Author Topic: Swap A & B Buttons round?  (Read 26029 times)

0 Members and 1 Guest are viewing this topic.

Offline actionless

  • Newbie
  • *
  • Posts: 21
  • Karma: +1/-0
    • View Profile
Swap A & B Buttons round?
« on: November 18, 2014, 03:12 PM »
Any chance we can get a little OS update to swap the A & B buttons round? Its been done on the N8, and the SD2SNES and Everdrive MD use the A button to select. Im forever pushing the wrong button on my gameboy  ;D !

Cheers!

Offline Xan

  • Newbie
  • *
  • Posts: 32
  • Karma: +1/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #1 on: November 19, 2014, 08:52 PM »
I've asked about this once for the Super Everdrive and got no answer. For some reason krikzz seems to like this counter-intuitive button mapping, I certainly can't think of any Nintendo game that uses B to select.

Offline goombakid

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1155
  • Karma: +74/-8
    • View Profile
Re: Swap A & B Buttons round?
« Reply #2 on: November 20, 2014, 05:15 AM »
It is possible, and he did mention that it will be implemented in a future OS update.

Patience, not persistence nor pestering, is the key.

Offline brooksyx

  • Full Member
  • ***
  • Posts: 130
  • Karma: +5/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #3 on: November 20, 2014, 05:41 PM »
Af first I was really for this but after using my super ever drive, EDGB, and ED N8 I always hit B button with no issues haha. But still in support of this option for sure!
NES - EDN8 | SNES - Super ED | Genesis ED-MD | Gameboy - EDGB | N64  - ED64 | Game Geear - Everdrive GG | GBA - EZ-Flash IV| Gamecube - XenoGC & EZ Flash IV | NDSL - R4 wood & EZ Flash 3in1

Offline dav3yb

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #4 on: November 29, 2014, 12:19 AM »
I was coming by just to ask this.  B = Back, or cancel, A = Accept, or select. 

so will an OS update be done through some custom rom file or something?

Offline karl_87

  • Newbie
  • *
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #5 on: December 01, 2014, 11:48 AM »
I would also like these changed around, or an option to change them.

Confuses me every time  :P

Offline Captain N

  • Jr. Member
  • **
  • Posts: 73
  • Karma: +4/-1
    • View Profile
Re: Swap A & B Buttons round?
« Reply #6 on: December 13, 2014, 04:06 AM »
Me too. Using this setup is the complete opposite of how I'm used to navigate menus. Making it customizable would be great.

Offline trekeyus

  • Jr. Member
  • **
  • Posts: 99
  • Karma: +6/-0
    • View Profile
    • my soundcloud
Re: Swap A & B Buttons round?
« Reply #7 on: December 14, 2014, 12:26 PM »
I have already gotten used to the current setup. it's not that hard to get used to it as retroarch has a very similar setup for navigating the RGUI.
Chaos reigns within - Reflect, repent and reboot - Order shall return

Offline nuu

  • Hero Member
  • *****
  • Posts: 2018
  • Karma: +88/-2
    • View Profile
Re: Swap A & B Buttons round?
« Reply #8 on: December 15, 2014, 03:35 PM »
But then you use your ED64 which is like you expect it to and then the problem is back. It's better to use the standard already used than to invent new ones.

Offline karl_87

  • Newbie
  • *
  • Posts: 48
  • Karma: +0/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #9 on: December 16, 2014, 01:25 PM »
Krikzz, any idea if this is possible please? :)

Offline goombakid

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1155
  • Karma: +74/-8
    • View Profile
Re: Swap A & B Buttons round?
« Reply #10 on: December 16, 2014, 06:09 PM »
Krikzz, any idea if this is possible please? :)

It is possible, and he did mention that it will be implemented in a future OS update.

Patience, not persistence nor pestering, is the key.

Offline wilykat

  • Full Member
  • ***
  • Posts: 228
  • Karma: +10/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #11 on: February 07, 2015, 04:26 AM »
Can it be used to read Sega "Game Factory" carts?  Blockbuster video originally planned on a system with reflashable cart and download a game ROM when someone wants to rent a game but it never took off and many Blockbuster ended up dumping Game Factory carts.  Most of them were blank but I have one that has a game.  If I could dump it I could compare with existing ROM and see if they are the same or not.

Offline strider_mt2k

  • The road less travelled...
  • Newbie
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #12 on: February 07, 2015, 01:30 PM »
Isn't it enough just to have this magical device in the first place?
Button placement is a minor quibble when seen against the bigger picture, which is having access to...everything.
You have access to the universe, and you have a problem with the placement of a couple of planets?

1st world problems, folks.
EverDrive GB, EZ-Flash IV, Super EverDrive

Offline saturnu

  • ヽ(^o^)丿
  • Hero Member
  • *****
  • Posts: 1182
  • Karma: +156/-0
    • View Profile
    • :D
Re: Swap A & B Buttons round?
« Reply #13 on: February 08, 2015, 12:52 AM »
if you really have to alter the button mapping of a gameboy game, it shouldn't be that hard, i guess.. let's try it together. ^^

the gameboy uses a z80 cpu, so you will have to patch your game in z80 assembler.
here is a quote from the "pandocs".
basically you have to read FF00 and compare the bits to an old state (0xff8b) if they are in a new state.
or read it a few times... and compare that values...

http://www.devrs.com/gb/files/gbspec.txt
Quote
I/O Registers

-------------



FF00

   Name     - P1

   Contents - Register for reading joy pad info

              and determining system type.    (R/W)



           Bit 7 - Not used

           Bit 6 - Not used

           Bit 5 - P15 out port

           Bit 4 - P14 out port

           Bit 3 - P13 in port

           Bit 2 - P12 in port

           Bit 1 - P11 in port

           Bit 0 - P10 in port



         This is the matrix layout for register $FF00:





                 P14        P15

                  |          |

        P10-------O-Right----O-A

                  |          |

        P11-------O-Left-----O-B

                  |          |

        P12-------O-Up-------O-Select

                  |          |

        P13-------O-Down-----O-Start

                  |          |



       Example code:



          Game: Ms. Pacman

          Address: $3b1



        LD A,$20       <- bit 5 = $20

        LD ($FF00),A   <- select P14 by setting it low

        LD A,($FF00)

        LD A,($FF00)   <- wait a few cycles

        CPL            <- complement A

        AND $0F        <- get only first 4 bits

        SWAP A         <- swap it

        LD B,A         <- store A in B

        LD A,$10

        LD ($FF00),A   <- select P15 by setting it low

        LD A,($FF00)

        LD A,($FF00)

        LD A,($FF00)

        LD A,($FF00)

        LD A,($FF00)

        LD A,($FF00)   <- Wait a few MORE cycles

        CPL            <- complement (invert)

        AND $0F        <- get first 4 bits

        OR B           <- put A and B together



        LD B,A         <- store A in D

        LD A,($FF8B)   <- read old joy data from ram

        XOR B          <- toggle w/current button bit

        AND B          <- get current button bit back

        LD ($FF8C),A   <- save in new Joydata storage

        LD A,B         <- put original value in A

        LD ($FF8B),A   <- store it as old joy data





        LD A,$30       <- deselect P14 and P15

        LD ($FF00),A   <- RESET Joypad

        RET            <- Return from Subroutine



          The button values using the above method are such:

          $80 - Start             $8 - Down

          $40 - Select            $4 - Up

          $20 - B                 $2 - Left

          $10 - A                 $1 - Right



          Let's say we held down A, Start, and Up.

          The value returned in accumulator A would be $94


the above example is from Ms. Pacman.

here is a rom from a gameboy sdk, it's a osk (on screen keyboard) with some basic navigation.
'A' writes a letter 'B' erases it.

download:
http://a.pomf.se/ifeoau.gb

i used BGB as gameboy emulator with an inbuild debugger.
http://bgb.bircd.org/

in the context menu with an right mouse click you can load the rom.
in the same menu use "Other->Debugger" to fire up the code window.
hit "Alt-A" to run it a bit and if you stuck in a loop press F9.
pushing F3 will step you through this loop. 0x0647 to 0x0665

if you remember from the pandocs example the button values for 'A' and 'B' are
          $20 - Button B
          $10 - Button A

on addr 0x0653 it jumps to 0x067E if 'A' is pushed and on 0x0657 is the jump for 'B'

now we start our hexeditor and change 0x651 to 'E6 20' and 0x657 to 'E6 10'.
if you like you could fix the chksum of the rom now, too.

finish!
if you start the rom again
'B' writes a letter 'A' erases it.

here is a picture of the hexeditor and debugger:






EDGB part:

this should only be done if you really know what you are doing.
if you update your edgb with a non-working firmware, it will brick.
it's far more save to work with the fpga based flashcart menus, because their bootloader loads the menu every startup
fresh from the sdcard.
this is the reason i don't want to provide any rom locations here. (sorry :D)

the EDGB os is a gameboy rom, too ^^
first the cpld maps this rom at startup, so the gameboy could access and run it.
so if you want to edit it, you first have to dump it off the eeprom. :>

step 1. use a dumper. maybe the ed64 transfer pak tool :D
lets call the dumped file 'GBOS.GB'

running this file in an emulator is a bit more troublesome as a real game, 'caus it reads hardware informations from some
hardware register addrs. you will have to step over a few things to find the right locations.
e.g. it communicates with the sdcard or an abstraction layer for the filenames.
so on the emulator you will never get a fileliste and stuck with the debugger in that loop, like in the above example... pretty obvious :>

step 2. patch the rom like above with a hexeditor

step 3. test your work first (load it like a normal game)! there is a high danger of bricking your EDGB, if you don't do this!

step 3b. maybe you will have to crank some version number a bit higher ^^
step 4. put the file in /EDGB/GBOS.GB - i think the os looks there for updates

step 5. power the gameboy with fresh batteries or power supply and update your firmware...


enjoy your altered and now more natural edgb. ^^

but really don't try this at home, it's fun to play with the hardware, but it's no fun for krikzz to fix bricked everdrives at all. ^^

everything is hypothetically spoken and there are maybe some errors in it, too :>

Offline Asaki

  • Full Member
  • ***
  • Posts: 158
  • Karma: +3/-0
    • View Profile
Re: Swap A & B Buttons round?
« Reply #14 on: February 08, 2015, 11:32 AM »
Yeah...I think I will play it safe and wait for an official update...

Lately, I just boot the thing up and hit "start", so I never even notice B or A.

You have access to the universe, and you have a problem with the placement of a couple of planets?

Well, yes. You see, take our solar system for example, the placement of Earth allows for a healthy atmosphere and conditions for sustainable life, whereas the other planets...not so much...

But unlike planets, the buttons can easily be swapped the correct way around in the next firmware update.

So your idea of a "first world problem" must be finding that all of your jeans have the zipper on the back instead of the front. Sure, you get used to it after a while, but...