# 3/8/2001

- Released version 0.0.5

# 2/8/2001

- Implemented a dialog to see and change the contents of the disk drives.
- Added support for multiple drives.
- Fixed a bug when pausing GLECK at the time the TR-DOS ROM was paged in.
- The console works much faster and it doesn't flicker anymore.

# 31/7/2001

- Finally implemented a first version of disk support. The only format supported is .TRD, which is used by Pentagon and Scorpion models, although I'm also working on +3 drive emulation. Only reading is allowed. No writing support yet.

# 30/7/2001

- Started writing a "framework" to support different disk drives configurations.

# 29/7/2001

- Rough attempt of TRD emulation. I can only try it on Pentagon, because the Scorpion emulation is still non-functional.

# 23/7/2001

- I've installed Windows 2000, which let me do some tests that Windows 98 didn´t allow me to do. For instance, I spotted a lot of bugs due to not releasing GDI objects after using them, which wasted lots of resources. It's fixed now.

# 22/7/2001

- Added an option to alter the palette, modifying each color's RGB values.

# 31/5/2001

- Implemented ROM patches. Right now, the tape loading routines are patched so it's not necessary to check the PC after every instruction. This lead to a slight FPS increase.

# 16/5/2001

- Changed the keyboard configuration:

- Right Shift now equals Caps-Shift.
- Left Shift now equals Symbol-Shift.
- Caps-Lock now equals Caps-Shift + 2.
- PC's cursor keys now equals Spectrum's cursor keys.
- Left and Right Control keys now are only used for joystick emulation.

# 11/5/2001

- 8 bit Stereo sound mode now sounds at the right pitch.
- Scanlines graphic modes now sense the borders to see if they must be redrawn. This increases the speed.
- Optimized by hand part of display routines. Achieved a 10 FPS increase.

# 6/5/2001

- TZX "Select" block is now handled.

# 3/5/2001

- Released version 0.0.4

# 25/4/2001

- The first time you load a file, the explorer starts in the default path. The next time, it'll start from the last browsed path. I think that this is more useful than the way I was handling the navigation.

# 22/4/2001

- Implemented SP loading from ZIP files.
- Implemented the loading of the rest of formats from ZIP files. If the ZIP has more than one "loadable" file, it opens a window with a list of them, so the user can choose which one to open.
- Fixed a bug. Loading a TAP without trapping the ROM crashed the emulator when it got to the end of the tape.
- I don't know how, but now "Heartland.z80" works.
- Pokes are now supported both by the Drag'n Drop and the "File Open" window.

# 19/4/2001

- Fixed a bug in Pentagon emulation. It doesn't hang anymore in BASIC mode.
- Fixed a bug with CPL instruction. I was setting wrong two bits (two bits!!). That made the Digital Integration protected games to fail. Now they work fine.
- Now, if there's no sound available, the emulator starts with no sound, instead of warning that and closing itself.
- The emulator changes its name. Now it's called GLECK. Thanks to Mario Sevillano Mansilla (from es.comp.sistemas.sinclair) for the name. The name comes from the different cursor modes of the Spectrum. G-raphics, L-owercase, E-xtended, C-aps Lock, K-eyword.
- Implemented prewiew from ZIP files. It looks for a SCR file inside. If it finds it, it shows it, else it looks for the first handled file and attempts to show it (SNA, Z80, SP, TAP or TZX).
- Implemented SNA loading from ZIP files.

# 16/4/2001

- Implemented 48K Issue 2 and Issue 3 emulation.

# 15/4/2001

- Couldn't resist and began working in the next release (0.0.4).
- Both languages (english and spanish) are now integrated in a single executable. By editing the INI file, you can select the language, so I don't have to mantain two versions (it was a lot of work to translate all the texts in each release).
- Rewrote parts of the TZX loader so it won't eat as much memory as before. I was creating too much structures in memory, with lots of useless and repeated information.
- Fixed an idiot bug which saved SCR files 16K long instead of 6912 bytes.
- If the INI file was missing, the emulator crashed. Fixed.
- If the selected model's ROM was missing, it also crashed. Fixed too.
- Auto browse tapes wasn't working. It opened and closed immediately (another of my stupid mistakes...)
- To fix later. Opening 32 TZXs in a row crashes the emulator. ¿?¿?¿?
- "Astro Marine Corps" TZX has 1064 blocks. I thought that no TZX would have more than 1024 blocks, so I was working with a fixed size array. Loading that file crashed the emulator. I'll switch to a dynamic linked list in the near future.
- Fixed a stupid bug that now allows Skool Daze to load. I was saving a 24 bit value in a 16 bit variable...

# 14/4/2001

- Released version 0.0.3

# 13/4/2001

- Fixed a huge amount of bugs. That huge that I can't remember which were them, but they involved things like the debugger, display, sound, window handling (now TAB in the dialogs work!), poke handling, thread handling, etc.
- Full screen mode now seems to works fine (it's still abit slow, but not THAT slow). It works fine on my desktop, but it crawls on my notebook.
- Now the emulator doesn't eat the whole CPU when paused.
- Fixed a strange bug when switching models.
- AY chip isn't emulated on 48K unless you specifically choose this. Obtained a noticeable speed increment by doing that.
- Heavy use of threads, which improved speed and some synchronization stuff.

# 8/4/2001

- Implemented a new display technique. In DirectX modes, if you work without using video RAM I lock the surfaces once, save the pointer, unlock the surface, to never do a lock again. Not locking the surface every frame improves the speed a lot. This isn't possible using video RAM because the pointer to the surface obtained in a lock may not remain the same. The video driver is free to do whatever it wants so we''l have to do the lock/unlock thing in order to avoid a crash. However this may cause some crashes on some machines. I've tested this on two different PCs and it worked right.
- Created a new "class" to handle full screen mode. Now I can remove a lot of repeated code and keep the changes in a single place.
- Full screen mode is still slow and rudimentary.

# 7/4/2001

- Added the ability to change the desktop configuration (colors and size) while the emulator is running. Now the change is detected and the display structures are reinitialized.

# 6/4/2001

- Fixed a bug were the POK files saved weren't recognized by the emulator (and hanged it).
- Fixed a couple of hangs when using the tape browser.
- Added a progress bar to the tape browser.

# 5/4/2001

- Added .POK files saving.
- Fixed .POK files loading.
- Pokes window is modeless now (is a lot more easy to use).
- Restructured a bit the file handling hierarchy.
- Fixed a bug when you deleted a poke.
- Improved the poke activation mechanism.

# 4/4/2001

- Added 128K SNAs saving.
- Added 128K SNA loading.
- Added Z80 (version 2.0) saving in either 48K and 128K (without compression though).
- Added options to disable the emulation status (FPS and time took by the display). Turning the latter option off will increase the speed of the emulator (I've noticed a 20 FPS increase).

# 3/4/2001

- Fixed a memory allocation bug caused by sound mode switching. I was writing onto unallocated memory.
- Added ACB and ABC sound modes to AY emulation, and options to change that setting.

# 25/3/2001

- Added a great deal of the functionality missing in the TZX player (moving through blocks, moving the tape pointer, etc).
- Added a TAP player which works exactly like the TZX one.
- Added options to automatically browse a tape when you open it, listen tape loading noise and loading at max speed.
- Fixed a huge bug which made that if you switched models with the emulator running it changed everything (ROM, timings, etc) but the old loop kept running.
- The TAP player now can move the tape pointer too.

# 24/3/2001

- Tried once more to put the display routines in a different thread with more success than the other times, but it doesn't get along with my full screen mode (which I just did).
- Sound was widely improved. I was sampling at 22050 Hz without knowing that, so that made some beeper music sound awful ("Spirits", "Sidewize").
- This implied corrected all sound routines and made visible a bug that was crawling somewhere regarding Digisound switching.

# 23/3/2001

- The debugger now works as a modeless window, so you can have the debugger working along the emulator (before they couldn't run at the same time). It implied rewriting the emulation loop (something which probably introduced new bugs).
- Fixed a bug in the SLL instruction. Now, "GhostBusters 2", which uses Alkatraz encryption loads fine. Also, "Cyberbig" now works OK.
- Fixed a bug which made that two concurrent graphic routines tried to lock the DirectDraw surface at the same time, which crashed the emulator.
- Exiting the emulator while the debugger was still running made that it kept running (pressing CTRL-ALT-DEL showed an instance of the emulator hanged).
- Corrected instructions CPD, CPDR, CPI and CPIR. Now "Zone Trooper" works fine.
- Corrected instructions LDI, LDIR, LDD, LDDR, INI, INIR, IND and INDR. Those starting with IN were just implemented. The rest got its flags corrected.
- Implemented instructions OUTI, OTIR, OUTD and OTDR. Some of them were already implemented but in a "how the hell does this work?" mode.

# 22/3/2001

- Finally, after days of fighting with the TZX reader, now I may claim that all my loading routines work perfectly. All the TZXs I've tested so far loaded fine, even those Speedlock 7. At last!!!
- Implemented saving and loading snapshots to / from RAM.

# 19/3/2001

- Solved a display problem in 128K mode. Two games (Abadía del Crimen and Starglider) wouldn't show but they didn't crash. It turned out to be that in certain situations, I was setting up the display reading data from the wrong screen page.
- Solved a bug in port reading. Revolution, which I've fixed once, now works again.
- Since 3 or 4 days ago, I'm working in a TZX "viewer and browser", but since I've lots of troubles with that format, I decided to put it aside for a while.

# 11/3/2001

- Took out every reference to MFC. Now the code is much more independent from Visual C++.
- Fixed a bug which let nonexistent files appear in the most recently used files.
- Fixed a bug which caused the emulator to hang if two instances where running (I was calling a function pointer which hasn't been initialized yet).
- Now it's possible to specify a default directory to look up for files.
- Fixed little bugs here and there.
- Cleaning up the code and changing stuff in order to enable some more VC++ optimizations, I went from 66 FPS to 92 FPS!!!
- When the file previewer can't find a loading screen for a given file, it shows a message on the preview pane which informs of that.
- I got to test DirectX 24 bits drawing routines, which were completely wrong. Now not only they do work right, but I added some Assembler, which speeded them up.

# 2/3/2001

- Fixed Mono 16 bits sound mode. Now it sounds OK with Digisound, but sounds slower without it. Also fixed a bit 8 bit modes (but they don't sound right yet, especially regarding AY sound) and speeded a little the sound routines removing some repetitive code.
- Implemented an option to choose whether the display (under DirectX) will use video or system RAM. Usually, video RAM goes slower than system RAM, but, as in my case, it's the other way round, so I'll let the user choose that.

# 24/1/2001

- Rewrote parts of the emulation code which were written in C++. Now they're written in C, using pointers to functions in order to simulate "objects". Now I have an equally structured but faster code (I've gained 4 FPS).

# 23/1/2001

- Implemented INI instruction.
- Fixed a bug with prevented some .Z80 snapshots from being previewed correctly (Thanks to Rodolfo Edison Guerra).
- Implemented SLL instruction. "Revolution" now works OK.

# 20/1/2001

- Version 0.02 released (english).

# 19/1/2001

- Corrected a bug in the debugger (it made the drawing routines erase portions of the emulator code).
- A new, and frustrated, attempt to put the display on a seperate thread. I give up, I have no idea of how to do this.
- Version 0.02 released (spanish).

# 18/1/2001

- Improved a little the TZX loading. Some games with wierd loaders even work! (Joe Blade 2).
- The option to load a .TAP through the emulated EAR bit is given (yeah, I know it's useless...)
- Implemented a message console to show lots of info about the emulation.

# 9/1/2001

- Implemented TZX loading. It only loads standard speed data blocks by now, but there seems to be a problem. Some games loads and resets themselves.

# 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

- The story begins...