Testing Emulators.

Emulator and emulator development specific topics
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Testing Emulators.

Post by Andy Rea »

Thanks Mike, i'll see what i can knock up then, hopefully by then end of the bank holiday i'l have something workable.

Regards Andy.
what's that Smell.... smells like fresh flux and solder fumes...
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Testing Emulators.

Post by sirmorris »

Andy Rea wrote: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.
I cheated. I'm blitting chars from a bitmap I made using some PRINTs and a screenshot :roll:

I'm considering code to dynamically read the font from the ROM, as long as this is possible for each of the EO supported systems.

Image

I'm not bothering with partial updates, the display is only refreshed when STOP, or STEP is clicked. Windows GDI isn't the easiest of systems to grok, if you want some words of encouragement just PM me.

Charlie
User avatar
Andy Rea
Posts: 1606
Joined: Fri May 09, 2008 2:48 pm
Location: Planet Earth
Contact:

Re: Testing Emulators.

Post by Andy Rea »

Well i know what Blitting is, but how to do it, i don't know, i guess there must be plenty of examples on the net thought, since as my emu is only ever going to be an ZX81 emu i could just draw the chars if stopped or single stepped, the realtime update it still a bit slow but it's useful for finding area's of memory that is been constanly altered, which you can then look at in more detail whilst single stepping, i'm just rewritting the main display handling at the moment to speed it up, it *was* a 24bbp BMP now it monochrome, so now i only update 1 byte(for every 8 pixels)[but sometimes 2 when hires does not line up with 8 pixel boundary] compared to 24, it makes quite a speed difference. Still haven't started my TZX handler yet, but have made pretty good progress wiuth the P file side.

See if this makes sense to you, when in p file mode if no name is specified i.e LOAD "" then a dialog pops up for you to select a file, which then loads, If you cancel the dialog ZX81 acts like you pressed BREAK, now if a file name is specified and it does exsist in the working folder (which is now user selectable) it will just load it, if it doesn't exsist ZX81 throws a BADFILE NAME error, just like if you try and save without a filename. you can fast load i.e file straight into memory, or Slow load running the rom code (bit of a bugger getting that to work but that another story).

As for saving i'm still working on that, obviously you can't save without a filename, so if file does not exsist then just create a new file and save it, now i was thinking that i could have a check box to allow automatic overwrite (to be used with caution) so if file already exsist it will just overwrite (as long as it's not a read only file in which case i want a dialog to allow the user to supply a new file name) as would be the case if my allow overwrite checkbox isn't checked.

it's usually around now that i start to loose interest in my great idea's but knowing others are interested too helps keep me going :P

Now that i think about it there are a couple of things i would like a poke in the right direction :-

1. throttling ? there is a high resolution timer available on most pc's right? can i used this to work out how many FPS my emu is going and then sleep for a few Ms to try and keep the speed at or near 50FPS.

2. Sound? I can;t find very much that is simple to understand on the net, but then again i'm not really sure what i should be looking for. i don;t want anything fancy just like to make tha loading/saving noises (if the user wants them).

Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: Testing Emulators.

Post by sirmorris »

In terms of memory updating I think that most programs typically concentrate changes in a small area. I keep a set of addresses that have been updated and when I update the window draw those that have changed in red. The changed set is cleared when you click step or run. You can see all the alterations when you scroll the view.

One idea might be a pixel-per-byte kind of mini-map of RAM. 256x256 pixels would be enough to show up changing areas and the update would be lightning fast... You could navigate the main window by clicking around the mini-map. It could start all white and pixels could go to black when the 1st change occurs then toggle black->red, to show up constantly changing values.

8-)
Post Reply