|
Post by jaromir on Jan 25, 2014 18:32:00 GMT -8
Hello, I thought of running 8086tiny on hadrware, which doesn't meet minimal hardware specifications (embedded microcontroller - 1,5MB of memory is really rather much in this field). However I could add external RAM to it - but RAM this couldn't be mapped into normal memory space, but is accessable through user functions. Because of this, it would be very useful to have access to 8086 emulator main memory and IO ports through dedicated functions, like
write_mem (unit32 address, uint8 data) for writing to memory and
uint8 read_mem (unit32 address) for reading memory. The same would go for IO ports access. This way I can redirect memory operations to hardware interface as I wish - I am aware that this is not the most effective way and it will slow down the emulator.
Source code for 8086tiny is, however, more clever than I am. I honestly admire and appreciate this masterpiece, but I don't feel like I'm competent to mess with the sources.
Is this redirection possible somehow? I feel like major changes and rewrite of some parts would be needed, but I wish to be wrong.
|
|
v
New Member
Posts: 16
|
Post by v on Jan 25, 2014 22:01:45 GMT -8
it's certainly possible, but I'd worry about performance first instead of the memory issue.
from my testing, you will have to make it 10x faster if you want to run on, say, ~100M cortex-m3/m4 mcus and get something that is barely usable (i.e. similar to the original PC XT)
|
|
|
Post by jaromir on Jan 26, 2014 1:41:41 GMT -8
V: thanks. Did you already do some tests with this, or similar 8086 emulator, on ARM CM3/4 platform? Could you share more info about your work?
|
|
v
New Member
Posts: 16
|
Post by v on Jan 26, 2014 12:44:37 GMT -8
no, i haven't started the actual porting to MCU yet, although I'm interested in doing that.
i just measured the performance using thumb2 on cortex-a8. on 1.5GHz Cortex-A8, it can execute ~1M instructions per second (versus ~10M on 2.6G 1st gen i7, and ~20M for latest fake86 on the same intel cpu).
FYI, the original pc/xt uses 4.77MHz 8086, which translate to less than 1M instructions per second (it heavily depends on the mix of different instruction types, as most instructions uses 3 or more clock cycles to complete.)
I'd also like to hear Adrian's opinion on how to optimize the simulator.
|
|
|
Post by jaromir on Jan 26, 2014 14:18:59 GMT -8
Uhm, that doesn't sound very good. I used or wrote some emulators before (Z80, 8051, 6502, ARM, PIC16) and on 80MHz Microchip PIC32 I got ~0.7M instructions per second of emulated Z80 core (I know it is much simpler core than 8086) and ~0.12M instructions per second for emulated ARMv5, with byte-by-byte access to external DRAM as main memory (more at jaromir.xf.cz/ ). I expected something in between for 8086 and planned to use new 200MHz Microchip PIC32 or some ARM CM4, with hope for somehow usable emulation speed.
|
|
|
Post by oebipapeh on Oct 25, 2019 5:56:45 GMT -8
|
|