I decided to use Qt+QOpenGLWidget as platform for emulator.
I named virtual PC based on Simpleton4: SimpX.
For now it's just testing platform without real specifications for future use.
First run of graphic program in emulator could be seen here:
https://youtu.be/pzXnAzf8gd8It runs this code:
Code:
mode new
r0 <- 32768
r1 <- ( 32768 + 4096 ) ; expression syntax is needed
start r2 <- r0
r3 <- 0
loop [ r2 ] = [ r2 ] + r3
r2 <- r2 + 1
r3 <- r3 + 1
void = r2 - r1 ; cmp (result is ignored)
jnz loop
pc <- start
Screen space is located at address 32768 in the CPU address space.
It is monochrome bitmap with 16 pixels per word, 256 pixels per line and 256 lines per screen.
So, overall video memory size is 4Kw.
Program just increments every word of video memory in increasing increments.
Emulator makes 1000 CPU steps per frame, so framerate is visually slow.
After some fixes and improvements Simpleton repositary on github will be replaced by SimpX repositary.