Kevin Thacker released a new work in progress version of his Amstrad CPC emulator called Arnold. For this release he did a huge amount of testing, especially for the FDC routines, and wrote a lot of tests to ensure that the emulator behaves just like the real machine.
You can get a precompiled version here: http://www.cpctech.org.uk/setup.zip
And for the Linux and Mac users (and Windows users :-)) – you can get the source code here: http://www.cpctech.org.uk/arnoldsrc.zip
Here is the changelog for this version (be prepared… it is huuuuuuge):
Gate-Array
- changed power-on colours for gate-array to be 0 (grey) following discoveries from gerald
- updated GA IN causing write to work on all GA types (previously only type 4)
- fixed lum calculation. It was going out of range and causing a bad result in the lumfirm test.
Disc/FDC
- fixed FDC: Format SC=0 results in 256 sectors
- fixed read data with N=0: read size depends on bit 0 of DTL
- fixed if drive is disabled report the correct information for sense drive status
- fixed a bug in the fdc recalibrate command. (sometimes it got stuck)
- fixed correct command decoding of recalibrate command
- fixed correct command decoding of seek command
- fixed correct command decoding of sense interrupt status
- fixed correct command decoding of sense drive status
- fixed incorrect reporting of drive when it’s not ready and doing a seek or recalibrate. it was always reporting drive 0 by mistake
- fixed when fdd busy state is cleared
- fixed result when ready changes during recalibrate or seek
- fixed FDC/FDD step rate timing (it was too fast)
- fixed FDC/FDD step rate at power on (it was not set correctly)
- fixed reporting of ST3 “two side” (matches write protect on EME-157)
- fixed: PCN is reset to 0 at FDC power on
- fixed: DMA mode and step rate of 0 is set at FDC power on
- implemented scan equal, scan low or equal and scan high or equal commands
- fixed: if drive A was only enabled, then discs could not be read. Drive A can now be enabled on it’s own
- fixed: removed step time per drive. gerald has shown the step rate is based on a multiple of an internal timer and that all drives are stepped from that
- fixed: sending seek multiple times *WHILE* it is seeking is ok. Before the fix there would be a hang
- fixed: drive polling is not done after every cpu instruction it is now done at the correct rate
- a bad calculation meant some extended disk images were not recognised as correctly formed. Fixed
- if autostarting a disc and the “auto start drive” is not enabled then enable it.
Snapshot
- fixed load and save of snapshots with RAM more than 64KB. Previous code only supported 64KB because of support for devices broke the previous method. The code now looks at the built-in RAM of the active machine AND the ram provided by dk’tronics compatible ram expansions to determine what should be saved and how much can be loaded
- fixed bugs in v3 ram block decompression
- if v3 compressed block size is >=65536 then winape stores it uncompressed. Check for this size and copy direct
- We now save blocks as length 65536 if they can’t be compressed
- in the snapshot save dialog you can see where each block comes from (internal, device or not mapped) and the list can be filtered according to what will be saved into the snapshot according to the selected snapshot version. V2 has a limitation where data must be continuous so you can click the checkbox to see which blocks will actually be saved
- You will be warned on save if the configuration can’t be saved into the snapshot accurately. This happens if you have devices activated, or are running in KC Compact or Aleste mode. NOTE: The snapshot file format is limited and doesn’t save all information accurately
- fixed bugs in CPC+ block reading and writing. Now supports the location Winape uses for it’s A0 port value. This means more snapshots from Winape will load
- When loading a snapshot Arnold will determine the configuration requested by the snapshot and the actual configuration and will report if the snapshot may not be loaded correctly. You can use the button on the dialog to configure the system to attempt to match the requirements. At all times you can click OK to try and load the file
- When loading a snapshot Arnold will tell you if there are some blocks in the snapshot file which are not handled (applies to v3).
Cartridge
- there was a bug with the way “mirrored” pages were calculated for cartridges. This caused problems for 512KB cartridges. This has been fixed.
Roms
- os, basic and amsdos override roms with amsdos headers can now be used.
Devices
- changed the way readport works for devices. Previously if the device didn’t assert the bus, a value was always returned and it was 0x0ff (this was not correct), now the device reports if it did assert the bus or not and the data is taken if it has otherwise data remains unchanged if it didn’t. This allows the “bus” value to remain unchanged if the device doesn’t change it. The emulation is now more correct. This makes symbiface 2 device and uide devices correct when reading from them
- added emulation of ROMBO rom-board. Thanks to ngroom on cpcwiki for testing his rombo rom board
- added emulation of Jon Bradbury’s uIDE 16 for CPC (made with his permission). Needs testing on a real device
- fixed Brunword Mk2 emulation (when upper rom is overriden or not and write through for 4000-7fff)
- fixed Brunword Mk2 reset and power on state
- fixed Amram2 expansion rom emulation (it wasn’t asserting ROMDIS so roms would not be active as they should be)
- fixed Amram2 write to ram; it is allowed regardless of upper rom enabled state. Previously the code did it only if upper rom was enabled
- fixed Amram2 reset and power on state (previously nothing was done)
- added dk’tronics 256kb ram. Needs testing on a real device
- added dk’tronics 256kb silicon disk. Needs testing on a real device
- added x-mass (tested against my own X-Mass)
- added emulation of 8-bit transfer for ATA (tested on X-Mass)
- fixed ATA 16-bit data emulation (previously acted like it was 8-bit). Tested on Symbiface 2
- added master/slave emulation for symbiface 2
- added drive jumper settings for ide device, supports: master/single, master with slave, slave
- added mode switches to multiplay (you can now choose between joystick or mouse input) (needs testing on real device. based on specification document)
- multiplay joystick 1 was broken. now fixed (needs testing. based on specification document)
- multiplay input didn’t seem to work correctly. now fixed. (needs testing. based on specification document)
- device system roms with amsdos headers can now be used. (e.g. hackit rom from cpcrulez)
- fixed multiface 2 device (checked against my own multiface 2) (emulation is much more accurate and the code has been changed to be more like the other devices)
- the device list can now be filtered through the context menu
- in the Device Switches dialog, particularly with a device with many switches, the switch state was not being saved correctly after editing. This has been fixed
- the default configuration for a device was being overwritten when reading configuration and it had not been set. This has been fixed. For example, this mean the default configuration for multiplay (which was set to joysticks) was being reset to using mouse
Mac
- if you had text in the auto-type dialog, closed the dialog, re-opened and dragged and dropped a file over it then the text would have been pasted onto the end of the original text. This then resulted in both pieces of text being typed. Now fixed
- if you chose to define keys for joystick it could crash.
Autotype
- smart quotes and smart hyphens would not be auto-typed correctly. These characters are automatically translated into the CPC equivalents when the autotype text is typed
- if autotype finds a character which it can’t translate it will now stop instead of continuing
- auto start/auto type will now do a power on/off rather than a reset. If invalid data is written to the FDC then a reset will not correctly restart it but a power on/off will. So better to use power on/off
General UI changes
- added CPC464 with DDI-1 configuration
- positional keyboard configuration didn’t show correctly on lubuntu. Fixed
- if a zip file had an implied directory (i.e. it had a file such as test/disk but no actual test/ entry, then this directory would not be found and displayed in the archive window. This has been fixed
- In the Media Status dialog if a new disk has been inserted and it hasn’t been saved it now shows “Unsaved file”
- In the Drive status dialog it now reports the track 0 signal from the drive
- the archive browser dialog now has a title based on what you are picking. (e.g. “Drive A”)
Keyboard
- typing using translated keyboard mode is much more responsive now. The key presses are now queued up and played back. It can now keep up with my typing
Graphics Viewer
- You can enable display of transparency. A pattern for transparent will be drawn. This is useful to see which pixels of a sprite are not drawn. e.g. pen 0 for Plus hardware sprites is transparent
- You can now flip the display vertically. This is useful to view sprites which are stored upside down
Joysticks
- Update list of physical joysticks/joypads when entering joystick dialog rather than when you pick physical device option
- Improved joystick dead zone detection and improved response for directions when using an analogue pc pad for cpc digital joysticks. Thank you to Aeliss
- joystick setup will default to keyboard for digital joysick 0 if no gamepad is connected. NOTE: joystick key override setting is disabled by default so you will need to enable it
Debugging
- you can now set a memory breakpoint from the memory dump window. Click on the byte, address or ascii character then right click and choose “memory breakpoint..”. You can configure it to be when memory is read or written
- removed “clear instruction” and “put debug opcode” these were not flexible enough and they were destructive to the ram
- SSCR vertical value was reported incorrectly
- PPI Control Read/Write IO breakpoint was incorrect. It was breakpointing when port C was being read/written
- improved “step into” (f11). If you step into and an interrupt occurs you will then step into the interrupt. Previously it skipped the interrupt and it was not obvious it had happened.
step into and step over should work the same as before apart from this change - labels from Winape and RASM can now be imported via the Label Manager
- fixed: the debug menu item used for turning the border on or off was not updating incorrectly
- sometimes breakpoints could not be placed correctly around address 0. This has been fixed.
Building
- Arnold gave an error about libexpat when compiling on lubuntu. Fixed
- Fixed inkz80 compile
- Windows version of Arnold is now built with Visual studio 2015 community edition
- Windows version is now built using SDL 2.0.5
- cmake build has been updated for Visual Studio 2017 RC.
Tests
- FDC tests have been re-written and made much more comprehensive
- in the disc tests, when the motor is turned off, wait some time for the motor to be “fully off” and the drive to be “not ready”. Before it was turning it off and the next test could be run with the motor still slowing down and the drive could still be ready depending on how long it takes to slow down.
- “SUCCEEDED” has been changed to “PASS”
- “FAILED” has been changed to “FAIL”
- I have grouped tests together into directories
- I have added information to describe what each test is doing before it starts. This tells you if it is automatic (i.e. it tests and then verifies the result), it is interactive (the user must do something), it is visual (visual confirmation by the user is required) or audible
- I have improved the feedback
- Some tests were reporting data – there was no verification or checking the values – these were for debugging against CPC configurations which I don’t have these have been disabled for this release. These will be re-enabled when I confirm the exact configuration that triggers the results I am seeing
- Many tests, especially the visual ones now have indication on the screen describing what is expected (e.g. vblank test has a line above and below the vblank and text to indicate what you should see)
- I have added a description of the computer systems I use for testing (see desc.txt). Use a similar computer to confirm the result
- Some tests require you to answer questions about the computer configuration used, some tests are disabled/skipped if the configuration doesn’t allow that test to function. In addition some tests require specific configurations or their results differ on different configurations
- changed PPI port B read to be more reliable: two tests a) vsync on always b) vsync off always
- added placeholder aleste 520 ex tests (These are waiting for testing and feedback on a real machine)
- added kc compact mode 3 and colour changing tests