Help with porting Arduboy core?

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Sat Dec 21, 2019 10:35 am

Arduventure uses its own complex sound generation, not the simple tones used by the majority of other games - so would require a more accurate implementation of the microcontroller's internal timers / oscillators / interrupts (also, the authors of Arduventure in particular are quite sensitive about the copyright of the game). The skeleton of the core is there now, and I would be more than happy for others to help improve it, or if desired steer it more towards hardware compatibility / accuracy / 'authenticity'!

I've just added Ardynia to the GitHub repo - which is in much the same vein as Arduventure :wink:

https://www.city41.games/ardynia

Indcsion
Atari nerd
Atari nerd
Posts: 44
Joined: Fri Oct 12, 2018 11:48 am

Re: Help with porting Arduboy core?

Postby Indcsion » Sun Dec 22, 2019 1:03 am

I hope someone finishes it, I definitely wouldn't be able. I still havent tried it yet, I dont know anything about about linux.

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Sun Dec 22, 2019 3:19 am

As Sorgelig would say: "It's not hard." :lol:

It's as easy as using a DOS prompt. If your MiSTer is on the network, you can get access to the linux console using ssh. Apparently Windows 10 even has ssh built-in now:

https://www.maketecheasier.com/use-wind ... sh-client/

So, at the Windows 10 command prompt just type (and replace 1.1.1.1 with your MiSTer's IP address):

Code: Select all

ssh root@1.1.1.1

(and the password is 1)

Then you can start the Arduboy core from the MiSTer menu and follow the instructions I gave previously to upload a hex file to it (type in 'minicom' etc etc).

And restart the Arduboy core from the MiSTer menu each time before sending a new file, or send a serial break from minicom to restart it instead (Ctrl-A and then 'F')

(EDIT: might have to also run the 'ssh on' script if it isn't on by default?)

Indcsion
Atari nerd
Atari nerd
Posts: 44
Joined: Fri Oct 12, 2018 11:48 am

Re: Help with porting Arduboy core?

Postby Indcsion » Sun Dec 22, 2019 5:25 am

Ill try it thanks

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Sun Dec 22, 2019 6:40 am

Have just added the hex file for 'Rooftop Rescue' as well... [smilie=greencolorz4_pdt_12.gif]

User avatar
kitrinx
Captain Atari
Captain Atari
Posts: 179
Joined: Wed Sep 26, 2018 6:03 am

Re: Help with porting Arduboy core?

Postby kitrinx » Sun Dec 22, 2019 10:59 am

If you need a hand hop on Classic Gaming discord and maybe I can help you get the loader going in a more idiomatic way.

https://discord.gg/UDu5ztY

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Sun Dec 22, 2019 9:14 pm

Well, I mean, having to upload over serial every time you want to play a new game is absolutely idiomatic for the Arduboy though! :)

But seriously, thank you so much for offering to help - I am going to have to take a break from this for Xmas though. But again, I am totally happy for anyone to make changes if they have the motivation to!

Thinking it over - I am already directly addressing the sd_buffer from the RISC-V microcontroller side for the purpose of non-volatile storage / EEPROM, so this is probably going to interfere with using file I/O?

Really, the most straightforward / simple solution would be to add in a new configuration string / menu option to the ARM side of MiSTer for automatically sending a file over the internal UART, the way I am manually doing it right now using minicom... even if no other core ever uses that option, I don't see the harm in having it available? There seems to be plenty in the ARM code already that is only there for the purpose of serving single cores?

Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 5793
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: Help with porting Arduboy core?

Postby Sorgelig » Sun Dec 22, 2019 11:47 pm

There is no point to use serial line for loading. Your core has ROM storage where hex file finally is loaded. You simply need to fill this ROM storage directly, not using serial line. So hex (or better binary) will be injected almost instantly to memory of your CPU.
Special support for some cores is added only when there is no other simple solution or doing it in FPGA requires a lot of resources.

Indcsion
Atari nerd
Atari nerd
Posts: 44
Joined: Fri Oct 12, 2018 11:48 am

Re: Help with porting Arduboy core?

Postby Indcsion » Mon Dec 23, 2019 2:28 am

I got it now with nml32's help. Its real easy to load a game now. I put up some videos. Its just as awesome as I thought it would be on the big screen. Thanks for making it.

Indcsion
Atari nerd
Atari nerd
Posts: 44
Joined: Fri Oct 12, 2018 11:48 am

Re: Help with porting Arduboy core?

Postby Indcsion » Mon Dec 23, 2019 4:08 am


User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Mon Dec 23, 2019 6:36 am

Indcsion wrote:I got it now with nml32's help.


Awesome! :D

(Looking good - not sure if those glitches showing up are from your video capture device? or maybe caused by a filter / scaler enabled in MiSTer not playing nicely with the core's super-sized pixels? Either way, glad you are enjoying)

Indcsion
Atari nerd
Atari nerd
Posts: 44
Joined: Fri Oct 12, 2018 11:48 am

Re: Help with porting Arduboy core?

Postby Indcsion » Mon Dec 23, 2019 5:37 pm

I dont remember seeing glitches when I was playing.
I used nearest neighbor scaling.

paisleyboxers
Atarian
Atarian
Posts: 1
Joined: Mon Dec 23, 2019 10:14 pm

Re: Help with porting Arduboy core?

Postby paisleyboxers » Mon Dec 23, 2019 10:16 pm

Heya Uxe - When I choose a target board for compiling Arduboy games in the IDE - what is my target board I should be selecting?

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Tue Dec 24, 2019 11:48 am

Ha - looks like it took a while for your post to be approved, I'll copy my earlier reply on Twitter here too:

https://twitter.com/uXeBoy/status/1209276119582593024

IDE.png
You do not have the required permissions to view the files attached to this post.

User avatar
BitsNStuff
Atari maniac
Atari maniac
Posts: 88
Joined: Tue Oct 16, 2018 7:55 am
Contact:

Re: Help with porting Arduboy core?

Postby BitsNStuff » Wed Dec 25, 2019 5:23 pm

I'm unable to help in any way I really wanted to say thanks for the work that's going into this core. I'd not even heard of Arduboy beforthis this core but I really want one now and I'm really quite excited to see how this core turns out. Thank you. :D

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Tue Dec 31, 2019 2:17 pm

OK... HEX files can now be selected from the F12 menu, then just reset the core (also from the F12 menu) and the core's bootloader will receive and run that HEX file at startup (might need more than one reset, still slightly buggy).

Updated .HEX and .rbf files are in the releases folder:

https://github.com/uXeBoy/Arduboy_MiSTe ... r/releases

(PS. the first 512 bytes of the HEX files are an empty block used for EEPROM storage)

I did try re-writing the RISC-V bootloder to load directly from the sd_buffer instead of over serial... but ending up just digging myself a big hole and hitting a wall! So, added in a uart instead that automagically uploads to the existing serial bootloader on reset, which also involved a lot of walls and holes... :roll:

BitsNStuff wrote:I'm unable to help in any way I really wanted to say thanks for the work that's going into this core. I'd not even heard of Arduboy beforthis this core but I really want one now and I'm really quite excited to see how this core turns out. Thank you. :D


Thank YOU so much, this kind of encouragement really helps make the effort feel worthwhile :D

NML32
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Help with porting Arduboy core?

Postby NML32 » Tue Dec 31, 2019 3:01 pm

Thank you!! :cheers:
I know what I’ll be doing when I get home. :D

trashuncle
Atari nerd
Atari nerd
Posts: 46
Joined: Fri Jul 05, 2019 9:34 pm

Re: Help with porting Arduboy core?

Postby trashuncle » Tue Dec 31, 2019 10:30 pm

Not sure what I am doing wrong. I put the VHD and the test hex files into the Arduboy folder. I booted up the arduboy rbf file that was uploaded to github today. All I get is flashing colors, no matter which hex file I load (using reset after each HEX load).

I am using HDMI, not direct video. Tried both Match display frequency and Low Latency, thinking it might be an issue with the video output.

Any ideas?

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Tue Dec 31, 2019 10:55 pm

Sorry - should have explained that! :oops:

The flashing colours are sort of the 'loading screen' - you should see the disk LED light up, and see the flashing colours for a while (10-20 seconds maybe?) and then the game starts... at least it does on my DE10-Nano?

Do the sd_* signals differ based on the speed of the SD card, or are they fixed? Maybe that's it? I'll play with some different cards and see if it makes it stop working? :?

jca
Atari freak
Atari freak
Posts: 73
Joined: Sat Nov 02, 2019 7:55 pm

Re: Help with porting Arduboy core?

Postby jca » Tue Dec 31, 2019 11:07 pm

trashuncle wrote:Not sure what I am doing wrong. I put the VHD and the test hex files into the Arduboy folder. I booted up the arduboy rbf file that was uploaded to github today. All I get is flashing colors, no matter which hex file I load (using reset after each HEX load).

I am using HDMI, not direct video. Tried both Match display frequency and Low Latency, thinking it might be an issue with the video output.

Any ideas?

I do not have any problem using HDMI. Not knowing what the VHD does I did not copy it to the Arduboy folder, just the HEX files to see what happens.
I can load the HEX files and after resetting the core the games run (it takes a little while before starting).
At this time I did not copy the VHD file, I will try later on.

NML32
Atari Super Hero
Atari Super Hero
Posts: 667
Joined: Tue Mar 11, 2014 1:54 am
Location: USA/Florida

Re: Help with porting Arduboy core?

Postby NML32 » Tue Dec 31, 2019 11:09 pm

I just tested and the games load from the OSD. My first load attempt failed after the first attempt all loads worked on the first try. :cheers:

https://youtu.be/rU6OUg8bbUY
Last edited by NML32 on Tue Dec 31, 2019 11:20 pm, edited 1 time in total.

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Tue Dec 31, 2019 11:16 pm

Excellent - thanks both for verifying! :thumbs:

trashuncle
Atari nerd
Atari nerd
Posts: 46
Joined: Fri Jul 05, 2019 9:34 pm

Re: Help with porting Arduboy core?

Postby trashuncle » Tue Dec 31, 2019 11:23 pm

uXe wrote:Sorry - should have explained that! :oops:

The flashing colours are sort of the 'loading screen' - you should see the disk LED light up, and see the flashing colours for a while (10-20 seconds maybe?) and then the game starts... at least it does on my DE10-Nano?

Do the sd_* signals differ based on the speed of the SD card, or are they fixed? Maybe that's it? I'll play with some different cards and see if it makes it stop working? :?


Ok so I tried all 4 of the test games, loaded the hex, reset, waited 40-60 seconds, still just flashing colors.

I am using a samsung 128GB card that has been working for everything else. I do not have the IO board and only the 32 MB of sdram, does that have anything to do with it?

User avatar
uXe
Atari User
Atari User
Posts: 39
Joined: Thu Nov 21, 2019 1:57 am
Location: Adelaide, South Australia
Contact:

Re: Help with porting Arduboy core?

Postby uXe » Wed Jan 01, 2020 12:02 am

trashuncle wrote:I am using a samsung 128GB card that has been working for everything else. I do not have the IO board and only the 32 MB of sdram, does that have anything to do with it?


I only have the bare DE10-Nano, so IO board / SDRAM won't be it...

Hrm... jca / NML32 - what size cards are you using? Maybe Sorgelig will have some insight, or be able to refactor / tighten up what I've done?

Thanks for trying!

trashuncle
Atari nerd
Atari nerd
Posts: 46
Joined: Fri Jul 05, 2019 9:34 pm

Re: Help with porting Arduboy core?

Postby trashuncle » Wed Jan 01, 2020 12:04 am

Always willing to test and help, unfortunately I don't have much knowledge on the code side of things, so my help is minimal (mostly just looking for bugs).

I spend more time playing around with cores and settings than actually playing the games.

Definitely excited for another whole world of games to play on my MiSTer.


Return to “MiSTer”

Who is online

Users browsing this forum: No registered users and 12 guests