Here's the programs I used fairly regularly to get EO reasonably correct:
You've done most of them, but I noticed you haven't tried Xtricator. It uses a completely different pseudo-hires routine to most programs. The Z80s IM2 mode is used to redirect the display away from the ROM routine.
Additionally a Question.
is the ZX81 databus always $FF when idle and expecting part of the interupt vector on it in IM2 ?
Well that was easy, IM2 now implemented...
QSDEF enda how long are those Vsync's !!!!
anyhows here it is
http://dl4u.savefile.com/f165c0a854d78b ... 8/AR81.rar
So the quick instructions, unrar into a folder of your choice and run the exe. after a few seconds yu should get the familiar inverted K. For now i only load P files and they have to be in the same folder as the exe, to load a P file just type LOAD "25THANNI" without the .P for example to load 25thanni.p , there are a few things you can play with, F3 will pause and un-pause the emulation, un-pause always goes into freerun (i.e will not stop at breakpoints) you can pause/unpause via control menu also. in control menu is cpu reset too.
view menu brings up 2 other windows, debug and mem-view(mem view is in a very flakey state of affairs at the moment but give me an idea of what i was after, would love the zx chars in there), on to the debugger which visually is quite heavilly based on Mikes layout on the top left is the disasemmbly pane which is of most use when single stepping the current instruction (the one that will be excuted when you click single step) is in the middle hi-lighted(an asterisk immediatly after the address means its probably a force nop and not the instruction shown), instruction above it are the past instructions and instrcution below are the upcoming instructions (no attempt is made to follow branches in the upcomming instruction [good idea ? worth inplementing?]) under that is a dicky breakpoint editor up to 16 breakpints at this time, either hex ($ffff or 0xffff) or decimal numbers can be entered 1 per line. next to that is three buttons and a couple of check boxes, teh disassembly check will show continous disassemble whilst running till next break (but not in free run) the mem update will update the memory view window in real time (noticable slow down in the emulation is apparent here) the buttons speak for them selves. you might by now have noticed that there are 2 full sets of registers been displayed the top set is the current values, and the bottom set is what will happen on the next instruction with the differences highlighted. (IM has 3 digits after it the first digit is the IM mode, second IFF1, third IFF2).
believe it or not, other than the almost obligatory 'Hello World' program this is the first 'C' program i have ever written, its flakey and needs throttling cuz it'll just sit there and use 99% CPU. oh and its single threaded cuz i don't know how to do threading yet ! Maybe some kind peeps onm here would like to give me some Lessons ? I'm not sure how far i will take this emulator it might go the way that many of my idea's go that is once i prove to myself that ' I can do it ' i kinda loose interest if you know what i mean. i remeber a zx81 prog i wrote took me nearly a year with a 11 month gap inbetween ! LOL
It's a great start to an emulator. Now all you need to do is the boring stuff... loading/saving, peripherals etc.
I wouldn't worry to much about multi-threading - EO isn't multi-threaded either, though I did once consider it and there's some threading code commented out in the source. On this laptop, your emulator never hits more than about 35% CPU time anyway.
Oh and the most important thing... change it so it displays black when the Vblank is being displayed
It's good to have a new emulator in progress !!! i'm at the office right now, but when I arrives to home this night I will take a look a the AR81 mainly to the Debugger facilities
Keep us informed of your progress !!!
Find it here
http://dl1u.savefile.com/bc11ba425886cc ... c/AR81.rar
how the Rewinder works, i have a array of structs, each struct hold a full copy of the registers (it was easier than doing just the changing registers), the hardware states at that time, and finally upto 4 memory addresses and there corisponding old values (4 because of the ghosting which i do at memory write time, instead of at memory read). So it doesn't use up too much more memory.
BTW how did you get those ZX chars in your memory viewer ? i'm still struggling trying to get real time viewer updates working at an acceptable speed.
p.s. would you believe English is my native language? Grammer what's that then?
anyhows the question is this should i base my Timing model in the tzx handler on 3.5Mhz or the real ZX81 3.25Mhz, not that its really going to matter much because i'll probably skip to the accutal data to load a into the emulator, but what if my created tzx are used in annother app?? do all other apps stick to the 3.5Mhz timing?
I have a #define in my TZX file code:
#define TZXSCALE(x) (((float)x)/(((float)3500000)/((float)machine.clockspeed)))
Then when I load a file in, all values are put through scaling.