Page 1 of 1

Pi Pico - Uzebox Emulator?

Posted: Mon May 31, 2021 4:24 am
by mapes
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?

Re: Pi Pico - Uzebox Emulator?

Posted: Mon May 31, 2021 6:22 am
by CunningFellow
I think it could with great effort. But I can't see a compelling reason to do so.

Re: Pi Pico - Uzebox Emulator?

Posted: Thu Jun 24, 2021 5:58 am
by rv6502
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.

Re: Pi Pico - Uzebox Emulator?

Posted: Fri Jun 25, 2021 2:56 am
by CunningFellow
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.