A gamebuino "emulator" ?

Libraries, utilities, bootloaders...

Re: A gamebuino "emulator" ?

Postby erico » Sun May 04, 2014 12:51 pm

...gave a go, works fine! Really fine!
But really fast too! :)

again, great work!
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: A gamebuino "emulator" ?

Postby dotdan » Sun May 04, 2014 1:34 pm

Deneth wrote:Because I felt like ruining part of my weekend, I made a Windows build (go to File/Download to download it):

https://drive.google.com/file/d/0B5TrQB ... sp=sharing


Nicely done!


-dotdan :D
User avatar
dotdan
 
Posts: 29
Joined: Tue Apr 22, 2014 9:00 pm
Location: Germany

Re: A gamebuino "emulator" ?

Postby BlackDragon » Sun May 04, 2014 1:54 pm

Hello.
I tried emulator and it's working great with included pong. But when I try to compile any example from gamebuino library and try to run it in emulator, I end up with this:
https://www.firedrive.com/file/F1AD994999D6ED99

Am I doing something wrong?
BlackDragon
 
Posts: 14
Joined: Sun May 04, 2014 1:31 pm
Location: Slovakia

Re: A gamebuino "emulator" ?

Postby DelphiMarkus » Sun May 04, 2014 8:10 pm

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.
User avatar
DelphiMarkus
 
Posts: 20
Joined: Sun May 04, 2014 7:59 pm

Re: A gamebuino "emulator" ?

Postby jonnection » Sun May 04, 2014 10:40 pm

Hello everyone

Very interesting thread.

I just came over here from the Hackvision, for some reason I missed the Gamebuino train entirely.

About a month ago, I ported Myles Metzler's TV_out library (including sound) & Nootropic Design's controller library over to SFML (simple and fast media library) to allow me to develop games for the Hackvision (Hackvision is a similar Arduino-based gaming platform, but is based on the tv_out). Alas, the Hackvision scene is very very quiet, and I'm wondering if its worth the effort anymore.

To the issue at hand: my approach for Hackvision was different from HW emulation. With a couple of defines I can get (almost) the same code to compile either as native PC program using Code::Blocks and SFML (=run on Win or Linux) or compile it in Arduino IDE. It works surprisingly well, especially when I do not to go silly with things that the atmega's 2K ram can't handle. I develop the code almost ready on the PC and then port it to Arduino (takes about 30 min max).

I haven't yet looked in detail at GBSIM but I wonder if it allows for proper debugging ? See, when the code is running as a native Win or Linux program, its possible to stop, step and watch the code, which ofcourse helps a lot in pinpointing stupid little mistakes in algorithms that are otherwise hard to catch. This is especially useful in game development, where you have to fine tune game behaviour and screen layout.

I'm not making any promises but I could try my approach on the Gamebuino as well. For example 4-channel sound would be quite easy to simulate in SFML using a sound buffer (as done here for TV.tone) whereas writing hardware audio support within gbsim sounds quite challenging. Similarly, emulating an SD-card could be done with direct reading from the file system = no need for complicated interfaces.

Let me know what you think.

User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: A gamebuino "emulator" ?

Postby rotyler » Mon May 05, 2014 3:33 am

ive read the readme but im still having trouble compiling my files to .elf files. Is there something im missing? :|
User avatar
rotyler
 
Posts: 22
Joined: Mon Apr 28, 2014 12:24 am

Re: A gamebuino "emulator" ?

Postby Deneth » Mon May 05, 2014 9:14 am

jonnection wrote:I haven't yet looked in detail at GBSIM but I wonder if it allows for proper debugging ?


simavr, the simulator I based it on, apparently has GDB support. I haven't looked into adding it to gbsim yet.

jonnection wrote:I'm not making any promises but I could try my approach on the Gamebuino as well.


I think having both types of systems could be useful. I wanted to use a real AVR simulator for making things like the dungeon demo, which doesn't use the Gamebuino library. Also, I wanted to learn how simulators work.
Deneth
 
Posts: 28
Joined: Sun Mar 02, 2014 11:44 am

Re: A gamebuino "emulator" ?

Postby Deneth » Mon May 05, 2014 9:20 am

rotyler wrote:ive read the readme but im still having trouble compiling my files to .elf files. Is there something im missing? :|


After you've turned on Arduino's verbose mode, you should see loads of text in the bottom part of the screen when you click "Verify". Look near the bottom for a file ending in .elf (it should be in your Temp directory), then give that to gbsim.
Deneth
 
Posts: 28
Joined: Sun Mar 02, 2014 11:44 am

Re: A gamebuino "emulator" ?

Postby BlackDragon » Mon May 05, 2014 10:09 am

DelphiMarkus wrote:@ 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.


Thanks DelphiMarkus!
It's working now ;) Now I can start with development for gamebuino :)
BlackDragon
 
Posts: 14
Joined: Sun May 04, 2014 1:31 pm
Location: Slovakia

Re: A gamebuino "emulator" ?

Postby DFX2KX » Tue May 06, 2014 12:17 pm

Hey, that windows emulator seems to be pretty nice. I lost to the computer, horribly! :D
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 115 guests