Pi Pico - Uzebox Emulator?

The Uzebox now have a fully functional emulator! Download and discuss it here.
Post Reply
User avatar
mapes
Posts: 149
Joined: Sun Feb 13, 2011 7:04 am
Location: Seattle

Pi Pico - Uzebox Emulator?

Post by mapes » Mon May 31, 2021 4:24 am

A friend of mine at work showed me his Pi Pico. Its decently equipped for a $4 SMD dual core 133mhz chip.

I don't have much experience with emulation, but I am curious if this ARM processor could 'emulate' an Uzebox easily with 2MB of flash and 263K of ram as a dedicated unit without an overhead OS.

From my understanding of most emulation on an OS (which is using them on old computers), the system usually needs to be about 10 times faster or more to emulate it properly.

Thoughts?

CunningFellow
Posts: 1256
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Pi Pico - Uzebox Emulator?

Post by CunningFellow » Mon May 31, 2021 6:22 am

I think it could with great effort. But I can't see a compelling reason to do so.

rv6502
Posts: 61
Joined: Mon Feb 11, 2019 4:27 am

Re: Pi Pico - Uzebox Emulator?

Post by rv6502 » Thu Jun 24, 2021 5:58 am

Emulating the video generation properly would require much more than 10x the speed as the pixels position & size depends on exact timing, can't cheat and count opcodes in a "meh, close enough" fashion.

133Mhz ARM Cortex-M0 doesn't have the speed nor register count to do this.
ARM CPUs are also terrible at emulating the 8bits ALU operations and flags of the AVR CPU.

The games could certainly be ported to it with video modes rewritten into native code.

Or with a lot of effort maybe a tool could be written to pre-translate the AVR binaries into native ARM binaries with proper timing (bunch of NOPs inlined) for the video generation. I'm sure I'm forgetting some detail that would throw a wrench into the whole idea.
Like streaming pixels off the SPI RAM. You have to figure out at runtime if the code is accessing the SD card or SPI RAM.

So that'd be way more work than just taking the source code and natively porting the games made so far.

CunningFellow
Posts: 1256
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Pi Pico - Uzebox Emulator?

Post by CunningFellow » Fri Jun 25, 2021 2:56 am

Welcome back
rv6502 wrote:
Thu Jun 24, 2021 5:58 am
Or with a lot of effort maybe a tool could be written to pre-translate the AVR binaries into native ARM binaries with proper timing (bunch of NOPs inlined) for the video generation. I'm sure I'm forgetting some detail that would throw a wrench into the whole idea.
Like streaming pixels off the SPI RAM. You have to figure out at runtime if the code is accessing the SD card or SPI RAM.
Yeah - I thought a binary re-compiler would be the only way to get there. Way too much effort for very little value.

Unless you just wanted to "flex" of course.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests