Friday, April 10, 2020

#CSpect V2.12.16

Another very minor update for plugin writers. This gives access to sprite image memory, and undoes a "fix" that wasn't right....

#CSpect V2.12.16 changes
  • Reverted .NEX border colour palette change, was just wrong.
  • Added PeekSprite(address) and PokeSprite(address,value) to iCSpect interface for plugins


Tuesday, April 07, 2020

#CSpect V2.12.15

This release is specifically to add to the plugin API, allowing plugin devs to control the debugger including single stepping and break points.

#CSpect V2.12.15 changes
  • Plugin API TICK() now called while in debugger mode
  • Plugin API can now control the debugger using the new extended eDebugCommand enum
  • -remote command line switch added, to disable the "visible" part of the debugger

public enum eDebugCommand
    {
        none = 0,
        ///Set remote mode - enables/disables debugger screen (0 for enable, 1 for disable)
        SetRemote,
        /// Get the debug state (in debugger or not - returns 0 or 1)
        GetState,
        /// Enter debugger
        Enter,
        /// Exit debugger and run (only in debug mode)
        Run,
        /// Single step (only in debug mode)
        Step,
        /// Step over (only in debug mode)
        StepOver,
        /// Set a breakpoint [0 to 65535]
        SetBreakpoint,
        /// Clear a breakpoint [0 to 65535]
        ClearBreakpoint,
        /// Get a breakpoint [0 to 65535], returns 0 or 1 for being set
        GetBreakpoint,
        /// Set a breakpoint in physical memory[0 to 0x1FFFFF]
        SetPhysicalBreakpoint,
        /// Clear a breakpoint in physical memory[0 to 0x1FFFFF]
        ClearPhysicalBreakpoint,
        /// Get a breakpoint in physical memory[0 to 0x1FFFFF], returns 0 or 1 for being set
        GetPhysicalBreakpoint,
        /// Set a breakpoint on CPU READING of a memory location[0 to 65535]
        SetReadBreakpoint,
        /// Clear a READ breakpoint [0 to 65535]
        ClearReadBreakpoint,
        /// Get a READ breakpoint [0 to 65535], returns 0 or 1 for being set
        GetReadBreakpoint,
        /// Set a breakpoint on CPU WRITING of a memory location[0 to 65535]
        SetWriteBreakpoint,
        /// Clear a WRITE breakpoint [0 to 65535]
        ClearWriteBreakpoint,
        /// Get a WRITE breakpoint [0 to 65535], returns 0 or 1 for being set
        GetWriteBreakpoint,
    };


Sunday, April 05, 2020

#CSpect V2.12.13

So this includes a few fixes users have found in the last version, including an important OS one - hence the quick release.

#CSpect V2.12.13 changes
  • Fixed GetRegister() callback
  • Fixed NextReg 0x05 reading
  • Setup some of the Nextreg on reset (also helps reset a bit better)
  • Fixed bit 3 of new NextReg 0x8E, which fixes dot commands (and sprite editor exiting)
  • Changed number of scanlines to 262 (HDMI) for 60Hz
  • Fixed a crash in plugin creation
  • Added pluging "eAccess.NextReg_Read" type (untested)


Friday, April 03, 2020

#CSpect V2.12.9

Been a while since the last update. This one adds the 2 new Next Registers that are required for the very latest NextOS - which is the main reason for doing this. There are a lot of other fixes as well....


#CSpect V2.12.9 changes
  • 50hz/60hz bit now set in NextReg 5
  • -debug added to the command line. You can now "start" in the debugger.
  • Minor Fix to 60Hz audio
  • Fixed AY partial port decoding
  • Fixed a minor reset stall when it was waiting on a HALT before the reset
  • NextReg 0x8c added
  • NextReg 0x8e added
  • Added AltRom1 support
  • Fixed a serial port "send" bug. Now sends the whole byte
  • Fixed tile attribute byte bit 7 - top bit of palette offset was being ignored
  • Fixed esxDOS date/time function (M_GETDATE $8E)
  • NEX file 1.3 now parsed... should load more things
  • NEX files get IRQs switched off when loaded (as per machine)
  • Fixed esxDOS date is wrong
  • Fixed Border colour now sets the palette entry as well
  • Fixed GetRegister() in plugins not working
  • Fixed Copper run then loop not working
  • Fixed Top line (in 256 pixel high view) is missing
  • Fixed DI followed by HALT should stop the CPU
  • Fixed Hires tilemap has clipping on far right
  • F8 not steps over conditional jumps and branches that go backwards. Branches forwards are taken
  • Fixed ADD HL/DE/BC,A no longer affects flags
  • Fixed OUTI so that B is decemented first. (OTIR was already like that)
  • Minor change to 60hz audio
  • NextReg 0x69 can now be read
  • DMA Continue mode added
  • Fixed a timing issue with DMA, so timing much better


Monday, January 06, 2020

#CSpect V2.12.5

Fixed plugin loading. This was due to the new loading/reset system that was nuking loaded plugin mappings.
I've also added a "Tick" to the plugin interface which gets called once per emulated frame, along with a debugger call which allows you to tell CSpect to enter the debugger. This is handy if you need to debug the operation that "just" happened.
Lastly... I've included a very simple plugin example, along with the interface .CS files to look at.


#CSpect V2.12.4 changes
  • Border now comes from fallback colour if paper/ink mode is 255 (as per hardware)
  • Fixed Plugin loading. Was broken due to new system loading+resetting.
  • Added new "Tick" to iPlugin interface, called once per emulated frame
  • Added Debugger() call to CSpect interface, allowing you to enter the debugger from the emulator
  • Added Plugin example (and current interface)


Friday, January 03, 2020

#CSpect V2.12.4

Another minor fix to fix a memory access bug, and a new MMC folder issue that appeared in the last couple of versions.


SNasm 2.0.21
  • Added “SLL” instruction


#CSpect V2.12.4 changes
  • Fixed memory reading of Layer2 mapping in $2000-$3fff
  • Fixed MMC path, it was being reset when loading SNA/NEX from the command line.


Wednesday, December 25, 2019

#CSpect V2.12.3

This is a minor update to fix Lowres and ULA scrolling. ULA X scrolling now uses the 2 new NextRegs - $26+$27.
It also fixes an annoying startup issue where if you didn't start in the EXE path, it just wouldn't start properly. This was due to the new plugin system, but should now be fixed. (fingers crossed). I've also added the missing LDWS instruction to SNASM


SNasm 2.0.20
  • Added “LDWS” instruction


#CSpect V2.12.3 changes
  • Lowres scrolling fixed.
  • Added ULA Scrolling registers $26 and $27.
  • Fixed HL being set to $10000 after reading a file at the end of memory...
  • Fixed a command line startup issue when not started in the EXE path


Sunday, December 22, 2019

#CSpect V2.12.2

This update is a little different, as it add's the ability for users to write their own "plugins". These plugins can take over memory read/write actions, port in/out's and Next Register access - or all of the above!
They can also query the Next's memory, ports, Next registers and Z80 registers, making it pretty useful for folk to add new toys, or add things like logging or profiling etc.

#CSpect V2.12.2 changes
  • Changed 320x256 mode to use Y/X orientation (0,0)=$0000, (1,0)=$0100, (2,0)=$0200. (0,1)=$0001,(0,2)=$0002 etc...
  • Plugin system can now get/set Z80 registers
  • A better reset on load of an SNA/Nex file. Should be a complete system reset now...
  • 320x256 Layer 2 screen mode added
  • NextReg $70 added ($10=320x256 mode)
  • NextReg $71 added. MSB of Layer 2 XScroll added
  • Added Port 0x123B extended memory mapping mode added - using bit 4 to select (untested)
  • A new plugin system added, so that folk can add their own toys or support custom hardware. See CSpectReadme.txt


Friday, December 06, 2019

#CSpect V2.11.9

EDIT: Updated to V2.11.10 - Couple of new command line options for the next dev team

This update is really just to release fixes the Next team have had for a while. With all the changes to NextOS, and the hardware changes, I figured I should release this even though 60Hz mode isn't working right. So most things should work fine, but 60hz mode certainly has issues....

SNasm V2.0.19 changes
  • You can now reference a local label. i.e. LD HL,LABEL@LOCAL

#CSpect V2.11.10 changes
  • added -major and -minor to let you set the CORE version number
  • added -emu to force the setting of the emulation bit in nextreg 0
  • added debugger command "nextreg ," so you can set a next register from the debugger

#CSpect V2.11.9 changes
  • Updated audio to be 16bit so DAC isn't squished to oblivion. (should just sound better in general)

#CSpect V2.11.8 changes
  • Fixed "all RAM mode". 2 configurations weren't working right.
  • Core version number updated to 3.0
  • -60 now does proper 60hz, including reduced lines and proper 60hz audio *not working fully yet*
  • -com2=??? added. You can now have a second UART that can be used to send to a real Pi
  • port 0x153b (bit 6) added to switch UARTs from Wifi to Pi
  • Reg $7f now defaults to $FF on power up
  • When no UART2, now returns $FF
  • .ROM files (for OS loading) now come from the same path as the IMG file, rather than program folder
  • Mono "textmode" added
  • CP/M mode now works
  • Proper 60Hz Layer2 and Sprites now working
  • Coms with the Pi (and it not being there), no longer crashes CSpect.
  • null comport now returns 0, as per hardware.
  • Tilemap clip window right edge fix - I think.
  • 1 Bit Tilemaps should now work when tiles are pre-defined in bank 10/11


Saturday, September 14, 2019

#CSpect V2.11.1

This update is to add in (most) of the new hardware/registers that the latest Spectrum Next firmware has added - along with the new OS which uses some of it. There are some amazing advancements in this firmware. 14Mhz CPU speed all the time, 28Mhz copper and 14Mhz DMA, along with things like smooth scrolling the ULA screen. Brilliant update from the Next team.

#CSpect V2.11.1 changes
  • Fixed extra pixel in wrapping scroll of ULA
  • Fixed label on/off
  • Fixed lowres vertex clip "smear"


#CSpect V2.11.0 changes
  • Fixed -tv command line, and made it actually switch off all shader usage
  • if bit 6 in attrib 3 is not set, #CSpect now properly ignores attribute 4
  • Copper now runs at 28Mhz
  • The CPU no longers slows down over the screen
  • ULA can now scroll in 1/2 pixels
  • ULA Shadow screen now works with Layer 2
  • Reg 0x69 added (Layer 2 enable, ULA shadow mirror, and port bits 0-5 goto port 0xFF)
  • Copper Reg 0x63 added
  • DMA is now always 14Mhz...
  • 4 bit lowres mode added (reg 0x6A)
  • Added $123b Read mode
  • Added $123b 48K mapping mode
  • Reg 7 is now R/W, and bits 4/5 now set correctly
  • Window regsiters are now R/W