Ardventure Port anybody

Moderators: mdrjr, odroid

Ardventure Port anybody

Unread postby db9979 » Mon Jul 16, 2018 4:18 am

Has anybody tried to port Ardventure to Odroid-Go.

I think that should be not a big problem to get the game run also on odroid-go

https://github.com/TEAMarg/ID-46-Arduve ... s/tag/v1.0
Did you see already our Rom List - and many other Informations?
Go here:
https://odroidgo.db-cloud.de
Facebook-Group
https://www.facebook.com/groups/odroidgo/
db9979
 
Posts: 23
Joined: Tue Jul 03, 2018 5:56 pm
languages_spoken: english, german
ODROIDs: Odroid-Go

Re: Ardventure Port anybody

Unread postby lix-alpha » Sat Jul 28, 2018 9:57 pm

I have an arduboy here and I love Arduventure!
It would be nice to see it ported to the Odroid Go. Along with the other games also. :)
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby mameise » Mon Jul 30, 2018 11:37 pm

Would be nice to see a port of ardventure or all arduboy games. Looked into the source but to port this is way beyond my possibilities... I hope someone will take the task. Seems to be a nice game.
mameise
 
Posts: 79
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO

Re: Ardventure Port anybody

Unread postby surpryse » Wed Aug 01, 2018 6:19 pm

I am waiting with confidence!
surpryse
 
Posts: 10
Joined: Tue Jul 31, 2018 4:16 pm
languages_spoken: english
ODROIDs: ODROID-GO

Re: Ardventure Port anybody

Unread postby lix-alpha » Thu Aug 02, 2018 12:23 pm

I saw Team-ARG (the group behind Arduventure) made a Steam collection of three of their games to play on Windows:
https://store.steampowered.com/app/8934 ... Anthology/

Maybe if we ask them to port it to the ODROID it can be arranged...
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby briansm » Fri Aug 03, 2018 3:08 am

Hi again.
I was thinking of having a go at this one, given I already have both an ODROID GO and an Arduboy, and have coded with both of them in the Arduino IDE.

At first I was thinking about a full Arduboy emulator, there are already emulators for the CPU (atmega328 - https://github.com/buserror/simavr) and the SPI calls could be trapped and send to an emulation of the 128x64 display running on the second esp32 core.... I'm not certain that the 240MHz esp32 core would be fast enough to emulate the 16MHz atmega328 at 100% speed though, that gives 240/16 = 15 instructions tops do decode/duplicate of each Arduboy instruction, which is tight.

But as practically all Arduboy games are a) open source and b) all use the same very simple API, it's way easier just to duplicate the API on the ODROID. My only concern is how to accurately ramp down the speed on the ODROID... It's been years since I coded for Arduboy, but looking at it again there is a FPS limiter which should carry across easily.

I can have a look at it at the weekend if anybody is interested.
briansm
 
Posts: 43
Joined: Wed Jun 27, 2018 3:35 am
languages_spoken: english
ODROIDs: Ordoid GO, Ordoid-W

Re: Ardventure Port anybody

Unread postby Molack » Fri Aug 03, 2018 7:08 am

That would be really cool.

Crazy. I bought my Go Just as a Gameboy for playing Games.

Now I got to the point that I will spend some more time with the arduino IDE as i did a lot some years ago.
Molack
 
Posts: 30
Joined: Thu Jul 12, 2018 4:25 am
languages_spoken: english

Re: Ardventure Port anybody

Unread postby lix-alpha » Fri Aug 03, 2018 11:17 am

Yes briansm, this would be very cool, lots of good little games on the Arduboy...
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby mameise » Fri Aug 03, 2018 11:54 am

Yes, also looking forward :)
mameise
 
Posts: 79
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO

Re: Ardventure Port anybody

Unread postby JasonB32 » Sat Aug 04, 2018 11:35 pm

briansm, I'm really hoping that someone can get an Arduboy emulator for the oDroid GO, that would be sweeeeet! Please please please and thank you!
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby briansm » Mon Aug 06, 2018 5:13 am

OK, This is the best I can achieve for the moment:

https://bitbucket.org/odroid_go_stuff/arduventure

As with other applications, download the Arduventure.fw file and add it to the odroid/firmware directory on your SD card to install

The source builds fine in the Arduino IDE.

The main problem is that there is no proper SD-card support in Ardiuno IDE, so the save game is stored in flash memory on the console.

This means installing a different emulator or application wipes out the save game.

Also, no sound.

A nice aspect is that because it uses simple x2 scaling of the 128x64 pixel Arduboy screen to 256x128, it uses half the pixels of the 320x240 screen and therefore runs at the full 60fps.
briansm
 
Posts: 43
Joined: Wed Jun 27, 2018 3:35 am
languages_spoken: english
ODROIDs: Ordoid GO, Ordoid-W

Re: Ardventure Port anybody

Unread postby lix-alpha » Mon Aug 06, 2018 5:25 am

Cool! It work perfectly m8 despite sound and saves.
How long did it take you from start to finish to port the game?
I really would like to be able to do that.
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby briansm » Mon Aug 06, 2018 5:45 am

That is a weekend of coding, couple of hours worth on and off.

The worst part was fixing a horrible bug in the graphics API that showed up when going from the 16-bit Arduino environment to the 32-bit ESP32.

Migrating the code from Ardiuno IDE to esp-idf would allow SD-card access and maybe sound, but that's a big job in itself.

Anyway, took much longer than I planned.
briansm
 
Posts: 43
Joined: Wed Jun 27, 2018 3:35 am
languages_spoken: english
ODROIDs: Ordoid GO, Ordoid-W

Re: Ardventure Port anybody

Unread postby lix-alpha » Mon Aug 06, 2018 6:03 am

Wow! Thanks for your time man.
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby mameise » Mon Aug 06, 2018 6:39 am

Yes really thank you man. I modified your code a bit and turned off the speaker complete as it made strange sounds all the time :)
Just needed to add the 2 lines:

pinMode(25, OUTPUT);
digitalWrite(25, LOW);

in the setup section.
mameise
 
Posts: 79
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO

Re: Ardventure Port anybody

Unread postby JasonB32 » Mon Aug 06, 2018 7:53 am

Thank you briansm!

I hope sound gets ported eventually, and/or a full on Arduboy emulator that would be sooo awesome. Castle Boy anybody? :D
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby briansm » Thu Aug 09, 2018 3:37 am

@mameise thanks for the no-sound fix, I've put it in the source now, works great.

For edification I ported the simavr Atmel emulator (https://github.com/buserror/simavr) to ODROID just to see how fast it would run. It's clearly not optimized for speed and more aimed at desktop PC emulation. It emulates the Arduboy ATmega 32u4 16MHz CPU at about 1.5Mhz, around 10x slower than it needs to be... bummer.

(I don't know of any more C based Atmel emulators, and I'm not going to do one from scratch. There is a Javascript Arduboy emulator, but that's not much use)
briansm
 
Posts: 43
Joined: Wed Jun 27, 2018 3:35 am
languages_spoken: english
ODROIDs: Ordoid GO, Ordoid-W

Re: Ardventure Port anybody

Unread postby JasonB32 » Thu Aug 09, 2018 3:41 am

@briansm, Excellent work. Back to the Future "BRILLIANT MARTY!"
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby JasonB32 » Thu Aug 09, 2018 4:06 am

@briansw, I just downloaded your arduventure.fw and put it in the odroid/firmware folder, there doesn't seem to be any sound at all? either snd ON or snd OFF, i don't hear anything?
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby briansm » Thu Aug 09, 2018 4:27 am

Sorry Jason, the fix is just to stop the annoying buzzing in the game rather than doing actual proper sound emulation.

I'm not going to try getting the sound working I'm afraid as

a) the code for the sound API is in Atmel assembly language instead of C and a nightmare to understand

b) the Arduino environment doesn't provide a proper i2c based sound buffer (one of the advantages of using esp-idf) so implementing any kind of sound emulation in Ardiuno is a chore

c) the sound in the Arduboy is 1-bit mono anyway and doesn't add much to games IMHO.

Sorry :(
briansm
 
Posts: 43
Joined: Wed Jun 27, 2018 3:35 am
languages_spoken: english
ODROIDs: Ordoid GO, Ordoid-W

Re: Ardventure Port anybody

Unread postby JasonB32 » Thu Aug 09, 2018 5:08 am

Ohh ok no worries then.. thanks for what you've done.
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby lix-alpha » Thu Aug 09, 2018 5:52 am

briansm wrote:Sorry Jason, the fix is just to stop the annoying buzzing in the game rather than doing actual proper sound emulation...


I still have to contact them about a port to Odroid Go. I stopped when I saw briansm porting it.
Ill try and contact them to see if the sound could be ported or converted somehow to something briansm can work with.
If other people want to contact them too go ahead, more of us asking, bigger the chances to get what we want.
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby mameise » Thu Aug 09, 2018 6:02 am

Permanent save would be way more interesting :)
mameise
 
Posts: 79
Joined: Sat Jul 07, 2018 6:40 am
languages_spoken: english german
ODROIDs: ODROID-GO

Re: Ardventure Port anybody

Unread postby JasonB32 » Thu Aug 09, 2018 6:06 am

lix-alpha wrote:
briansm wrote:Sorry Jason, the fix is just to stop the annoying buzzing in the game rather than doing actual proper sound emulation...


I still have to contact them about a port to Odroid Go. I stopped when I saw briansm porting it.
Ill try and contact them to see if the sound could be ported or converted somehow to something briansm can work with.
If other people want to contact them too go ahead, more of us asking, bigger the chances to get what we want.


@lix-alpha Contact who? The Arduadventure team or Hardkernel? I'd love an Arduboy Emulator that would be sweeeet. There's so many other good games like Castle Boy etc.
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby lix-alpha » Thu Aug 09, 2018 6:31 am

Contacting Team-A.R.G., makers of Arduventure.
As I said, they released a windows version of 3 of their games so porting them to the Odroid Go is probably something they can do.
https://store.steampowered.com/app/8934 ... Anthology/
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby JasonB32 » Thu Aug 09, 2018 9:24 am

lix-alpha wrote:Contacting Team-A.R.G., makers of Arduventure.
As I said, they released a windows version of 3 of their games so porting them to the Odroid Go is probably something they can do.
https://store.steampowered.com/app/8934 ... Anthology/

@lix-alpha Ok I PM'd them on Twitter. Let's start a petition :D
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby JasonB32 » Fri Aug 10, 2018 7:03 am

lix-alpha wrote:Contacting Team-A.R.G., makers of Arduventure.
As I said, they released a windows version of 3 of their games so porting them to the Odroid Go is probably something they can do.
https://store.steampowered.com/app/8934 ... Anthology/

Team-ARG has responded to me and stated they will ONLY be doing games for the Arduboy for the seeable future, no oDroid GO unfortunately. Some mad scientist needs to make an Arduboy emulator!
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby lix-alpha » Fri Aug 10, 2018 11:05 pm

Sad! I contacted them too through Facebook and asked them if they would be willing to help us develop some kind of emulator to play their games on the ODROID GO.
By "us" I mean briansm of course! lol
I am waiting for their answer.
User avatar
lix-alpha
 
Posts: 65
Joined: Fri Jul 27, 2018 9:41 pm
languages_spoken: english

Re: Ardventure Port anybody

Unread postby JasonB32 » Sat Aug 11, 2018 1:12 am

They respond way quicker through Twitter. I always use Twitter, I find much better, quicker results.

Here was their exact response:
"Hi, we’re not porting any of our games to any other device than Arduboy (really we don’t have time, to do that), but people are free to port our games themselves."
JasonB32
 
Posts: 39
Joined: Sat Aug 04, 2018 11:33 pm
languages_spoken: english
ODROIDs: oDroid GO

Re: Ardventure Port anybody

Unread postby Dreamer3 » Sun Sep 23, 2018 10:54 pm

It emulates the Arduboy ATmega 32u4 16MHz CPU at about 1.5Mhz, around 10x slower than it needs to be... bummer.


Yikes. I'd think (with optimized code) you should be able to do much better. Does avrsim decode the instructions each time or have a decode pass and then execute the cached decoded instructions each time? I need to read up on the ESP32 CPU architecture - not sure how it compares with registers to AVR. If it has approx. the same # of registers and and a relative jump (jump based on address + value of register) I'd think it'd be possible to emulate at full speed - though you might need to drop to assembly.

Can the ESP32 compile toolchain do inline assembly?
Dreamer3
 
Posts: 2
Joined: Sun Sep 23, 2018 10:41 pm
languages_spoken: english
ODROIDs: none yet :(

Re: Ardventure Port anybody

Unread postby Dreamer3 » Sun Sep 23, 2018 11:56 pm

The worst part was fixing a horrible bug in the graphics API that showed up when going from the 16-bit Arduino environment to the 32-bit ESP32.


You mean in how the Arduboy code compiles on ESP? Could you clarify a little more what the issue you found was?
Dreamer3
 
Posts: 2
Joined: Sun Sep 23, 2018 10:41 pm
languages_spoken: english
ODROIDs: none yet :(

Re: Ardventure Port anybody

Unread postby crashoverride » Mon Sep 24, 2018 10:00 am

Dreamer3 wrote:Can the ESP32 compile toolchain do inline assembly?

Yes, an example is here:
https://github.com/OtherCrashOverride/go-play/blob/c573693f91864e116c6ccd6a18becbb020506f3b/gnuboy-go/components/gnuboy/save.c#L227-L231

The manufacturer has not publicly released any assembly reference documentation for the ESP32. The instruction sequence used in the above example was documented in the "errata" for the ESP32.
crashoverride
 
Posts: 3981
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1


Return to Game Emulators

Who is online

Users browsing this forum: No registered users and 3 guests