A gamebuino "emulator" ?

Libraries, utilities, bootloaders...

Re: A gamebuino "emulator" ?

Postby Myndale » Fri May 09, 2014 4:34 am

Just a quick update on the emulator I've been working on myself...nothing to release publicly yet but I have got it to the stage where it's playing all the Gamebuino demos (apart from 2 player pong) as well as my own 3d demo:

http://imgur.com/a/IpL7j

Currently working on the sound engine.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: A gamebuino "emulator" ?

Postby ripper121 » Fri May 09, 2014 7:50 am

Can we add Reputation to the Profile of Users to honore such amazing work *-*
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: A gamebuino "emulator" ?

Postby rodot » Fri May 09, 2014 11:01 am

Wow, that's impressive!

For people who wonder how to add the bootloader in their emulator (only works with hex files)...
1- make a copy of gamebuino_boot.hex
2- open it in a text editor
3- remove the file ending line :00000001FF
4- paste the content from your game's hex file, including the file ending line
5- you now have a hex file containing both the bootloader and the game

I never used ELF, but this website seem to explain how to merge them: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15171.html
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: A gamebuino "emulator" ?

Postby ThatOneGuy » Fri May 09, 2014 9:24 pm

DelphiMarkus wrote:Great work!
I compiled the simulator myself on Linux and it's running fine. :) But pong is lightning fast am I not fast enough or does the simulation run too fast? Crabator runs fine, too.

@ BlackDragon
The battery level seems not to be implemented yet. I did a quick & dirty hack by simply commenting out everything that was inside the "case 0:" branch of the switch statement in function "Gamebuino::displayBattery()" from "Gamebuino.cpp" included in Gamebuino library.
This simply skips this warning and let you play the game you want. :)

Looks like that now:
Code: Select all
case 0://battery critic, power down
         /*sound.stop();
         backlight.set(0);
         display.clear();
         display.print(F("NO BATTERY\n\nPLEASE\nTURN OFF"));
         display.update();
         while(1);*/
         /*set_sleep_mode(SLEEP_MODE_PWR_DOWN);
         sleep_enable();
         sleep_mode();
         sleep_disable();*/
         break;


You should probably undo this hack once you have your Gambuino. ;) But obviously there will be a newer version of the library till then.


Sorry if this is stupid, but I am kind of a noob in programming. I managed to get the emulator working but I could not figure out where or how to put this code in to fix this problem. I'm sorry if I am missing something simple.
ThatOneGuy
 
Posts: 1
Joined: Fri May 09, 2014 9:18 pm

Re: A gamebuino "emulator" ?

Postby Myndale » Sat May 10, 2014 1:45 am

ThatOneGuy wrote:Sorry if this is stupid, but I am kind of a noob in programming. I managed to get the emulator working but I could not figure out where or how to put this code in to fix this problem.


It's in the Gamebuino library, you'll probably find it in C:\arduino-1.0.5\libraries\Gamebuino\Gamebuino.cpp. Open the file with notepad or something, search for the function (i.e. "Gamebuino::displayBattery"), comment out the code as DelphiMarkus showed above and relaunch the Arduino IDE.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: A gamebuino "emulator" ?

Postby Deneth » Sat May 10, 2014 2:14 am

DelphiMarkus wrote:Great work!
I compiled the simulator myself on Linux and it's running fine. :) But pong is lightning fast am I not fast enough or does the simulation run too fast? Crabator runs fine, too.


I've implemented some speed limiting, check the repository at https://github.com/33d/gbsim. I've been working on getting a less hacky and more reproducable (for others) Windows build, which is taking a long time.

DFX2KX wrote:Hey, that windows emulator seems to be pretty nice. I lost to the computer, horribly! :D


I watched someone else playing it, and they worked out that doing nothing seems to make you more likely to win!
Deneth
 
Posts: 28
Joined: Sun Mar 02, 2014 11:44 am

Re: A gamebuino "emulator" ?

Postby Deneth » Sun May 11, 2014 11:36 am

I've come up with a Windows build environment, so someone else can try building it:

https://github.com/33d/gbsim-win

The latest Windows build contains speed limiting.
Deneth
 
Posts: 28
Joined: Sun Mar 02, 2014 11:44 am

Re: A gamebuino "emulator" ?

Postby DFX2KX » Sun May 11, 2014 2:14 pm

Myndale wrote:Just a quick update on the emulator I've been working on myself...nothing to release publicly yet but I have got it to the stage where it's playing all the Gamebuino demos (apart from 2 player pong) as well as my own 3d demo:

http://imgur.com/a/IpL7j

Currently working on the sound engine.


Nice Work, Myndale. it looks like we're going to have (at least) two working emulators for the platform, even before it ships.
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: A gamebuino "emulator" ?

Postby Myndale » Sun May 11, 2014 9:42 pm

DFX2KX wrote:Nice Work, Myndale. it looks like we're going to have (at least) two working emulators for the platform, even before it ships.


Thanks DFX2KX. I haven't checked Deneth's project in detail yet but from what I've seen it should be quite good performance-wise and, most importantly, is cross-platform. Mine on the other hand is .NET (i.e. Windows-only) and targeted squarely towards developers with a built-in debugger etc which hopefully I'll one day expand out to a full source debugger.
Myndale
 
Posts: 507
Joined: Sat Mar 01, 2014 1:25 am

Re: A gamebuino "emulator" ?

Postby DFX2KX » Tue May 13, 2014 11:58 am

you can make .net stuff work in Linux with WINE, but it is a pain in the backside.

I'll probably have both of them on my computer, at some point. yours for building the game, the other to make sure it works in both environments. After that, it'll be going to my Gamebuino to test on the hardware proper.

A full source debugger would be nice, some of us are not all that good with C XD
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

PreviousNext

Return to Software Development

Who is online

Users browsing this forum: No registered users and 121 guests