Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for UnoCart (w/ STM32f4 MCU) #364

Open
sa666666 opened this issue Aug 23, 2018 · 3 comments
Open

Add support for UnoCart (w/ STM32f4 MCU) #364

sa666666 opened this issue Aug 23, 2018 · 3 comments

Comments

@sa666666
Copy link
Member

sa666666 commented Aug 23, 2018

I don't know how feasible this is, but it was mentioned here:
http://atariage.com/forums/topic/281105-open-source-c-project-template-now-available

This would involve, at minimum, finding an open-source, GPLv2-compatible emulator for the STM32f4 chip, similar to the Thumbulator stuff for the Harmony. There are probably other issues, but this would be the hardest part.

@sa666666 sa666666 added this to the Prio 3 milestone Aug 23, 2018
@thrust26
Copy link
Member

thrust26 commented Sep 8, 2019

Some basic info:

  • Harmony: NXP ARM7TDMI-S (ARM7 core, ARMv4T architecture, Thumb),
  • UnoCart: STM32F407 (Cortex-M4 core, ARMv7-M architecture, Thumb & Thumb2)

I suppose the UnoCart uses Thumb2 code (too). @DirtyHairy do you know details here?

So far I found:

@DirtyHairy
Copy link
Member

That is entirely dependent on the compiler; most likely, we would be dealing with Thumb 2 + FPU, but there could also be plain ARM instructions executing. The most reasonable thing would be to include an existing CPU emulator, and QEMU is a likely candidate --- it has been along for a long time and is battle tested.

However, with Zack's stuff, I think the biggest challenge is getting the synchronization between the ARM and 6502 right. If I understand his scheme correctly, he is generating a dynamic stream of 6502 instructions on the ARM, so we will have to get ARM emulation and 6502 bus activity into sync. From what I understand, qemu JITs whole blocks of memory into native code that is then executed, so that might be difficult to do, but the description of unicorn sounds like they might already have solved the problem for us. A very interesting find, definitely worth a second look.

@DirtyHairy
Copy link
Member

Maybe a good way to tackle this would be to try and replace the existing thumbulator code with Unicorn. If that works out, then getting Zack's scheme working should be a good deal easier,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants