14/11/2000
- Implemented a Most Recent Used file list.
- Fixed a bug where the display destructor (of the display class) wasn't ever being called, so if you changed lots of times from GDI to DirectX and viceversa, you ended up eating the whole video memory.
12/11/2000
- Implemented a status bar where I put the running model, the time needed to draw a frame and the frames per second achieved. The second figure will disappear soon (it's only useful to me), the latter gives a good idea about the real performance. You should reach 50 fps.
- In the status bar, flashes the word "TAPE" when you load a .TAP file.
- Fixed the timer code. It seems the synchronization is better.
- I have no idea why (because it sort of did it itself) but the whole thing is running better. Thank God, cause I almost throw the bloody emulator away today...
10/11/2000
- Again, a Santiago Romero's suggestion improved the speed of the drawing routines. He suggested me using smaller precalculated tables for the display mapping. Now, those tables are of 800 bytes instead of 200Kb, so they could fit into the CPU's cache. In some processors, the speed gain is overwhelming.
8/11/2000
- Thanks to Santiago Romero, I speeded up a little bit the drawing routines (scanlines) using Assembler.
- Modified the drawing routines so in 128K they draw 311 lines instead of 312. Now, border effects in 128K looks better.
- 32 bit graphic mode still crawls. I think that my drawing algorithm sucks (maybe I need to use a palette for that mode?)
3/11/2000
- Tossed AY-8910 emulation into a class. You do things right or you don't.
29/10/2000
- Implemented Drag'n Drop with the emulator running or before running. (it can take the snapshot to run as a parameter in the command line).
- Implemented settings for the emulation process priority. Now it can run in Idle, Normal, High and Realtime priority.
- Vectron border now shows the right height!!!
22/10/2000
- I tried to put the display in a thread again. The results weren't bad in my notebook, but in my PC they're awful. I'll leave it aside for a while until I understand this thing about threads.
- Implemented Kempston joystick emulation, using arrow keys and left CTRL for fire.
- Implemented Fuller joystick emulation (just the joystick, the Fuller audio chip isn't emulated). Use the same keys as Kempston.
21/10/2000
- Fixed a bug so the emulator won't crash if you drop twice the same file.
- Speeded up a little the GDI drawing routines.
- Fixed a bug with the Z80 files with SamRam paged not working.
- Implemented OUT (C), 0. Now "Hercules" demo runs, among others.
- Corrected the timing of LD IXh, IXl, IYh e IYl. It improved the music of some Dinamic games (Phantis, Nonamed, Phantomas).
- Fixed the bug in which you lost the beeper sound after changing modes. It actually was turning down the volume of the beeper. I didn't realize that.
- Speeded up a bit the DirectX 8 bits graphic mode, using memset to draw the borders instead of a while loop (slow). Until I don't write my own memset in Assembler to work with words and dwords I won't be able to do the same with 16, 24 and 32 bits routines.
- Change of graphic mode from the options window now set the proper window size.
20/10/2000
- Implemented persistance of the options. There's a file (setup.ini) which holds the emulator's setup.
- Implemented Drag'n Drop!! It was easier than I thought. Now it you drop a file onto the emulator it runs it (with .TAP files you have to type LOAD "").
19/10/2000
- +2A and +3 emulation now work! Appart from wrongly paging the memory, I wasn't emulating port 2FFD. Special paging modes aren't emulated yet. Let's see when they're needed.
- Vile attempt to put the display in a seperate thread. It went so bad that it worked slower than before...
- Implemented load and save of .SP files.
- Fixed the saving of .SNA files.
- Implemented .BLK files loading.
- Spectrum 16K now has ONLY 16K, not 48K as it used to.
- Fixed TR-DOS emulation. Now it pages right, but since I'm not emulating the floppy drive yet...
- Because of that and a lot more things, Pentagon 128K and Scorpino 256K emulation now work. Pentagon seems to work fine, but the Scorpion, in Basic mode, resets itself when you insert a line. My paging code sucks.
11/10/2000
- Corrected the flags of a lot of instructions. It doesn't changed a lot, but it's a step towards perfect flag emulation.
- Partially solved the change of the audio mode. Now it doesn't hang when you change the mode, but I don't know why, if you change and the return to WaveMapper, the beeper sound goes away (but the AY still sounds).
- Improved the class structure of the program. It should give me a more modular and easy to mantain code.
- Now, each model manages its own memory scheme, memory access and I/O ports. This lets me avoid lots of IFs and speed up those code portions.
- That also improved a bit the memory paging in 128K. +2A and +3 still don't work, but what the heck!
21/9/2000
- DJNZ had the wrong t-states. As a side effect, Knightlore's music now plays at the correct speed and the border stripes when you SAVE have the right height.
- Partially fixed the bug with Sidewize. It ahs something to do with INning from non-existant ports (0xff). I should return data from the screen. Instead of that, now I'm returning random values (with certain restrictions, so Arkanoid can run properly).
- I need to put the display routines running in another thread. If I use scanlines, the audio synch goes to hell.
- Fixed a stupid bug which kept me from saving .SNA and .SCR files (you were using the wrong file variable, you idiot!)
- Fixed another stupid bug which kept the "Step" function of the debugger from working (when clicking the button, I was calling the wrong function...)
- Another stupid bug more! The GDI display with scanlines wasn't updating the FLASH attribute. Now it's done.
20/9/2000
- Fixed the audio in 128K mode. Now the beeper plus the three AY channels play together, thanks to a dirty little routine which mixes the audio by adding them, taking care of not going over 0x7fff, which is the maximum (signed 16 bits).
- WaveMapper audio now works at 44100, 16 bits, stereo. I'll have to give options to set that in the case of slow PCs or cheap sound cards.
- Sidewize runs really bad. I'll need to dig into it to find the problem.
- Knightlore's music goes too fast.
- Robocop's speech isn't playing. I think I know why.
- Most of the TAPs doesn't work in 128k. No idea why.
10/9/2000
- Implemented emulation of 128K, +2, +2A and +3. The latter two don't work because I haven't emulated properly the ROM bank switching. The other two also have problems, maybe related to instruction timings and memory paging.
- Implemented AY-8912 emulation, taking parts of MAME routines, and fiddling a bit with them to sound in stereo.
- Implemented sound thorugh WaveMapper. In some machines works better than DirectSound (depending on your hardware).
- Improved the GDI mode. Now the screen is drawn in a memory bitmap before blitting it, which is faster than the painfully slow SetPixel I was using before.
- Because of that, the file preview goes much faster now.
- GDI mode now support scanlines.
- Improved DirectSound (without AY emulation), using a buffer technique similar to the one I'm using for WaveMapper (it improved the performance in my notebook, which used to skip samples).
6/9/2000
- Implemented sound through PC Speaker as a class (I'm working with C++, I forgot to say that). Now it can chosen through the Options window.
- 8 bit display now works. I was having troubles with the palette. I'll have to test it in different machines.
5/9/2000
- Fixed the BEEP command. Now you can hear the keys click and "Abu Simbel Profanation" sounds fine.
- Added DirectX 8 bit display mode (256 colors). The palette sometimes looks ugly. I don't have the slightest idea of how to fix this right now...
- Optimized by hand the drawing routines of DirectX 16 bits. Now I have to do the same with 8, 24 and 32 bits routines. Maybe, in the future, I'll turn them to Assembler.
- Now I know how to mae the PC Speaker sound. It sounds awful, but remains as an option if you don't own a sound card.
27/8/2000
- Loads and saves screen files .SCR.
- Saves .SNA files.
- Now you load the different file types from a single window instead of a window for each file type.
- Display now works with 16, 24 and 32 bits (I guess it works with 24, haven't tested it yet).
- Loading routines now search the tape the requested block before returning an error. It improves the use of some games which load levels from tape (Laser Squad).
- Now, LOAD "anything" can be interrupted. Before, it entered in an endless loop.
Pokes. You can apply and unapply them. It lets you load .POK files.
24/8/2000
Fixed TAP loading. Now some multiload games (and I guess that all games which reads data from tape using the ROM) work.
23/8/2000
- Now, when changing the graphic mode, the window doesn't change its position, just its size.
- TAP loading is way more complicated than I thought. Programs which use parts of the ROM routine (not the whole of it) doesn't work.
The debugger isn't MFC anymore. Now it's quicker, and now... it works...
22/8/2000
- Fixed the change of modes (now the window size is properly adjusted if I'm drawing the screen with scanlines or not). Changing one graphic option now respects the settings of other options.
Now, when you reset, you don't lose the chosen .TAP.
21/8/2000
- Fixed the load window. Now works fine and it even has a preview for TAP, SNA and Z80 files!
- First attempt to adjust emulation speed. ĄPretty cool! Music sounds at the right speed although it cuts every now and then (I guess it's because of DirectSound).
I'm getting used to the Win32 API, so I'm saying goodbye to most of the old MFC code, which is good in performance terms. The size of the executable was reduced because I removed a lot of garbage laying around.
20/7/2000
- It's been two months since last entry in this log. I've fixed most of the bugs of earlyer versions.
- Every instruction was checked and I'm almost sure that they are 100% correct.
- Now I correctly emulate R register, so Jonathan Smith's games (Hypersports, Firefly, Hysteria, Batman: The Caped Crusader) runs fine.
- Added a very primitive sound routine. Since I'm not synching it with the core speed, I often miss sound samples.
- Speeded up a bit the display routines (GDI and DirectDraw). GDI is way too slow yet.
- It now loads .TAP files.
I still have to fix the slow memory issue, synchronize the CRT beam with the interrupts, improve the sound and toss away everything MFC related (which is slowing me down the emulation), etc.
22/5/2000
- Fixed RL, RR, RLCA and RRCA instructions. I wasn't taking the former carry bit into account (so, the byte didn't rotate, just shifted left or right and the exiting bit was missed). This means that now the scroll in the menu of Jet Set Willy works, and Willy appears at the right spot (he doesn't fall 3 or 4 screens before starting the game).
- PRINT 10 now prints 0.01010101E8, which is a great leap forward since the 0 it printed before. The one to blame: RL C wasn't working.
Jet Set Willy II now works, Fairlight won't scan the keyboard and it seems that I can run BASIC games (High Noon is working).
21/5/2000
- Fixed how instructions alter the PC. Up to now, there were some opcodes which added more than they should, often missing instructions.
- BASIC programs now run, but they can't do any math.
11/5/2000