jedie / DragonPy

Emulator for 6809 CPU based system like Dragon 32 / CoCo written in Python...

Home Page:http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=5&t=4308

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance

opened this issue · comments

Statement from README:
"With PyPy round about 6.900.000 - 8.000.000 CPU cycles/sec. In other words with PyPy it's 8 times faster as the real Hardware."
Could you add processor model? Because I'm getting 35.000.000-40.000.000 CPU cycles/sec with latest PyPy (and you know it's one thread).
My CPU is Intel Core i5 4460

Good question ;)

I didn't know the used CPU... And yes, PyPy is much faster...

@jedie btw, your dragonpy can have like 100-400 mils cpu cycles, if you implement it using RPython :) But it's not easy and you don't need that performance xD

That's the point: What goal has this implementation?
Main goal for me: I wanted to learn more about 6809 CPU and the dragon platform.
Second was to have a useable BASIC editor.

"Migrate" to RPython can be fun. But i didn't have the time... I would also start with the 6809, first: https://github.com/6809/MC6809

@jedie there's Game Boy emulator written in RPython.
I made a copy on GitHub and refactored a bit. https://github.com/TiberiumPY/PyGirlGameboy
CPython, PyPy can run RPython as normal Python, but RPython can be translated using RPython toolchain to C.

@jedie biggest restriction of RPython:

x = 123 # ok
x = '123' #error

So one variable can have only one type and there should be enough information to RPython to 'prove' it's only that type

(and in RPython you will have to use some low-level functions, you can't even use input() but you can use os.read)

@jedie also, for MC6809 you can use 'Pydgin' - for creating ISS simulators (there's a example of ARM v5 implemented in Pydgin, and it's almost as fast as qemu)