A downloadable tool for Windows, macOS, and Linux

Download NowName your own price

v2.19.9.1

  • Fixed BREAK opcode being swapped to $FD00 - coz I'm an idiot
  • Added new BREAK opcode to the debugger
  • SNASM Updated - noticed it was an one ...
    • Fixed "RSSET RS+1" - RS was being reset to 0
    • Added binary separator %11_00_00_11 is now valid
    • Added hex separator $FF_FF is now valid
    • Added octal separator ?77_77 is now valid
    • Added decimal separator 12_34 is now valid
    • Fixed HEX inside and IF/ENDIF block
    • You can now use "." inside a label again (PDS)
    • BANK(unknown)now reports and undefined symbol
    • BANKOFF(unknown)now reports and undefined symbol


v2.19.9.0

  • BREAK opcode swapped to $FD00 - should map to a NOP on real hardware
  • Fixed a hard crash in sprites over the top border in modes 3,4 and 5


v2.19.8.1

  • Fixed debug keys - F1,F10 etc. Sorry - my configs got nuked and that disabled them. Now working again.)
  • Icon should also be fixed

v2.19.8.0

  • Added a new extension DebugOut, allowing you to have your Z80 write text to the console (see readme.txt)
  • Changed to a "console app" so that console writing works the same on each platform
  • Beast demo updated to demo "DebugOut" using "D" and "R" keys

v2.19.7.3

  • Fixed command line option -mmc which was being over written by the drive to make the command line simpler

v2.19.7.2

  • Fixed a bug where gamepads could be ignored if there were dummy controllers being enabled. Now controllers need at least 1 button
  • Fixed a bug where a program uses the NEX file to load from, and queries the "position" and it was wrong.

v2.19.7.1

  • DMA timing a little closer
  • I now emulate the DMA "bug" where everything is out by 1 byte if running at 3.5 or 7 Mhz.
  • DMA Sample now uses keys 1,2,3,4 to swap CPU speeds - and demo the DMA bug
  • New non-GPL2 AY Emulation built in directly.
  • With the removal of the old AY Audio, Plugin License changed to MIT

v2.19.7.0

  • High Freq monitor support. When started with -fullscreen  -60    -vsync,
    CSpect will now try to set the monitor frequency to match the target FPS.
  • Fixed up bugs in Layer2 demo - was pretty old, and broken. Now working as you'd expect.
  • Fixed up lowres build batch file, and swapped to a .NEX image
  • Fixed up DMA demo so it builds again - NOTE: Don't use ZXNEXT & Z80 together. Just use ZXNEXT.
  • Old LDIRScale command removed - was never implemented.
  • Fixed CTC cascading.
  • Fixed streaming length of open file

v2.19.6.2

  • Added mouse wheel support via port 0x0ADF
  • -emu now DISABLES emulation machine ID (0x08). This is now default, and -emu will set a REAL ZX Next (ID of 0x0a)
  • Try to detect wrong use of -nextrom so it doesn't all just die a horrible death.
  • Added Zip2SD tool, allowing you to build an SD card image from a ZIP file.

v2.19.6.1

  • Fixed a bug in updated esxDOS where FSTAT with an open file wasn't working

v2.19.6.0

  • Alt+F4 should work again
  • The latest OS (V2.07l) now works

v2.19.5.4

  • Window ICON is only set on Windows, as MacOS appears to have a MONO bug that crashes (not tried Linux yet so disabled)

v2.19.5.3

  • Fixed a crash where you start up in 48k mode then press F2 - due to esxDOS not being initialised properly
  • esxDOS now always "on" if no command line set

v2.19.5.2

  • On HARD reset, spritres are now cleared
  • On HARD reset memory is cleared/roms reloaded
  • ULA line is now always cleared if enabled
  • Cleaned up debugger DIVMMC/NextRef layout
  • F8 now toggles VSync
  • Added new IFileIO interface to Plugin system
  • New [Function] attribute to allow cross plugin calling
  • Added cross plugin calling via a new "Execute()" command.
  • Internal refactor of esxDOS plugin to allow filesystem replacements
  • NEX file handle passing to z80 changed to use new inter-plugin calling system
  • Icon added to CSpect Window Title Bar


If you want to help support my work...

Become a Patreon at: https://www.patreon.com/mikedailly
Main Website: https://lemmings.info
Instagram: https://www.instagram.com/_mikedailly
Discord: https://t.co/q9u0cmfBz6

StatusReleased
CategoryTool
PlatformsWindows, macOS, Linux
Rating
Rated 5.0 out of 5 stars
(10 total ratings)
AuthorMike Dailly
Tagsdebugger, Emulator, emulators, spectrum, tool, z80, ZX Spectrum, zx-spectrum-next, zxspectrumnext

Download

Download NowName your own price

Click download now to get access to the following files:

CSpect2_19_9_1.zip 3 MB
CSpect2_19_8_1.zip 3 MB
CSpect2_19_7_3.zip 3 MB

Development log

Comments

Log in with itch.io to leave a comment.

Am I the only one getting "Virus detected" warning from the Windows Defender, which unfortunately blocks 2.19.9.1 download?  2.19.9.0 and older download fine.

The threat found is supposedly "Trojan:Win32/Vigorf.A", but it does not say which file within zip file is affected.

Had the same problem. Spoke to Mike who stated it was a false positive, but struggling to permit Windows to download.

Yup. Maybe Mike could figure out what is different between the two versions and fix that?  Nothing in the above release notes suggests something new that could trip up the AV heuristics.  This is a blocker for me to consider upgrading, and I'm sure it is also a blocker for many  other folks.

AV programs will do what they do. Since CSpect isn't a program that's used by huge numbers of people, they always flag it. Add to it that it's obfuscated, and I open files in share mode etc... they will pretty much always flag it.

While I could pay "hundreds" of pounds/dollars for a code signing certificate, they are of limited use anyway, and for a free product, I'm simply not willing to pay that expense.

I "might" see if I can put it on steam to download, as that skips the AV issues, however without a full UI, you lose that command line use, and it becomes harder to use...

Understood, thank you. It's a pity that the circumstances are that way, but I understand your choices.  FWIW maybe you can work out a solution to open the sources without giving up the control over the emulator.  I'm saying this only out of wariness that such a good and cornerstone piece of software may be gone one day if you decide to retire or otherwise lose interest. I decided to become a patron to motivate you to hang around for longer :D

Hi, just making sure - the Next $b0$b1 (extended keys) registers are not implemented, right? I keep getting 0 from them, also - bit 4 of $68 also seems to do nothing. Testing on the hardware it works as intended. BTW Thanks for the great work on CSpect!

No, there is currently no support for extended keys.

Ok, thanks. Managed to handle arrows using zx+ extended codes (CSpect's "basic" mode). Observed a strange behaviour though: if I press say "up" and, while keeping it down, press "left", then release only "left" ("up" stays pressed) - seems like both bits for "5" and "7" are back to "released" (high) state instead of just "5". Works as expected on the hardware.

(2 edits)

Hi, the 'break' statement no longer activates the cspect debugger when I compile and run. I'm using latest CSPECT release and compiling  my code with Sjasmplus. Seen a report down below that suggests it could be Sjasmplus problem?

** Issue solved - 'break' works as usual after compiling and using the latest SJASMplus.

The opcode for BREAK has changed - please see the docs.

This allows actual hardware to ignore it, as it's now evaluated as a NOP.

I tried several versions of CSpect and kept getting this error

#CSpect Start

Next ROM enabled

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithObjectsAndKeys:]: second object of each pair must be non-nil.  Or, did you forget to nil-terminate your parameter list?'

Does anyone have a suggestion on what to try to resolve this?

Using Macbook Pro M1 on Sequoia was the same as using the previous Mac OS.

What's you command line?

facing same issue. command line: 

`mono cspect.exe `

Which platform? No game on the command line?

Setting up on a Mac
https://lemmings.info/installing-cspect-on-a-mac/

Setting up on Linux
https://lemmings.info/installing-cspect-on-a-raspberry-pi-5/

OSX 15.0.1, ARM based Mac M3.

No game in command line. When I try to execute `mono snasm.exe` - it prints help, but when I try to execute `mono CSpect.exe` (with or without parameters) it's always giving me crash: 

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithObjectsAndKeys:]: second object of each pair must be non-nil.  Or, did you forget to nil-terminate your parameter list?'
 
*** First throw call stack:
(
0   CoreFoundation                      0x0000000188fc8ec0 __exceptionPreprocess + 176
1   libobjc.A.dylib                     0x0000000188aaecd8 objc_exception_throw + 88
2   CoreFoundation                      0x0000000188f1a3f8 -[NSDictionary initWithObjectsAndKeys:] + 816
3   ???                                 0x0000000102a7d3bc 0x0 + 4339520444
4   ???                                 0x0000000102a7b81c 0x0 + 4339513372
5   ???                                 0x0000000102a77658 0x0 + 4339496536
6   mono-sgen                           0x0000000102519e48 mono_jit_runtime_invoke + 1748
7   mono-sgen                           0x00000001026a2cb4 do_runtime_invoke + 104
8   mono-sgen                           0x000000010269f0e0 mono_runtime_class_init_full + 584
9   mono-sgen                           0x0000000102512988 mono_jit_compile_method_inner + 1080
10  mono-sgen                           0x0000000102515bc8 mono_jit_compile_method_with_opt + 2308
11  mono-sgen                           0x000000010258c4d4 common_call_trampoline + 1264
12  mono-sgen                           0x000000010258bf8c mono_magic_trampoline + 116
13  ???                                 0x000000010299c2fc 0x0 + 4338598652
14  ???                                 0x0000000102a7a80c 0x0 + 4339509260
15  ???                                 0x0000000102a79e68 0x0 + 4339506792
16  ???                                 0x0000000102a77e14 0x0 + 4339498516
17  ???                                 0x0000000102a77810 0x0 + 4339496976
18  ???                                 0x0000000102a777a4 0x0 + 4339496868
19  ???                                 0x0000000102a77658 0x0 + 4339496536
20  mono-sgen                           0x0000000102519e48 mono_jit_runtime_invoke + 1748
21  mono-sgen                           0x00000001026a2cb4 do_runtime_invoke + 104
22  mono-sgen                           0x000000010269f0e0 mono_runtime_class_init_full + 584
23  mono-sgen                           0x0000000102512988 mono_jit_compile_method_inner + 1080
24  mono-sgen                           0x0000000102515bc8 mono_jit_compile_method_with_opt + 2308
25  mono-sgen                           0x000000010258c4d4 common_call_trampoline + 1264
26  mono-sgen                           0x000000010258bf8c mono_magic_trampoline + 116
27  ???                                 0x000000010299c2fc 0x0 + 4338598652
28  ???                                 0x0000000102a77538 0x0 + 4339496248
29  ???                                 0x0000000102a77658 0x0 + 4339496536
30  mono-sgen                           0x0000000102519e48 mono_jit_runtime_invoke + 1748
31  mono-sgen                           0x00000001026a2cb4 do_runtime_invoke + 104
32  mono-sgen                           0x000000010269f0e0 mono_runtime_class_init_full + 584
33  mono-sgen                           0x0000000102512988 mono_jit_compile_method_inner + 1080
34  mono-sgen                           0x0000000102515bc8 mono_jit_compile_method_with_opt + 2308
35  mono-sgen                           0x000000010258c4d4 common_call_trampoline + 1264
36  mono-sgen                           0x000000010258bf8c mono_magic_trampoline + 116
37  ???                                 0x000000010299c2fc 0x0 + 4338598652
38  ???                                 0x0000000102a770f4 0x0 + 4339495156
39  ???                                 0x0000000102a706bc 0x0 + 4339467964
40  ???                                 0x0000000102a7412c 0x0 + 4339482924
41  mono-sgen                           0x0000000102519e48 mono_jit_runtime_invoke + 1748
42  mono-sgen                           0x00000001026a2cb4 do_runtime_invoke + 104
43  mono-sgen                           0x00000001026a6298 do_exec_main_checked + 104
44  mono-sgen                           0x000000010255e284 mono_jit_exec + 376
45  mono-sgen                           0x0000000102560660 mono_main + 6100
46  mono-sgen                           0x000000010250c744 main + 1644
47  dyld                                0x0000000188aec274 start + 2840
)
libc++abi: terminating due to uncaught exception of type NSException

Let me know if you need full output (there's part about Native Crash reporting / Managed stack trace present as well)

Hi Mike.
Are you sure the break opcode is working in 2.19.9.1? Its not working for me,  it shows as NOP,  but the exact code works in 2.19.8.1.

Heres the sjasmplus memory output showing as DD01.

21   FDE8         DD 01         break

 22   FDEA       21 FC FD     ld      hl, STRING

 23   FDED      DD 01         break

Cheers, Dicky

Hi there, as listed in the readme, the BREAK opcode has moved to   FD 00. This allows it to be executed on real hardware without breaking everything.

Oh, I misunderstood the readme sorry. Hopefully sjasmplus  has been updated to reflect this too. I will check.

cheers!

Can anyone confirm if Head over Heels runs on CSpect?  There was mention of it below (someone trying to get it running) but no confirmation they succeeded.  Thanks!

runs perfectly.

Thanks Mike!

The Discord link doesn't seem to work at the moment, is there any chance it can be updated? I'd like to join.

https://discord.gg/RvG4pNJBKb

I got the following errors when I execute CSpect 2.19.7.1 under macOS. Do you have any idea ?


#CSpect Start

Next ROM enabled

Error in DLL: /Applications/cspect/app/Zip2SD.dll

Exception: Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.

Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

   Exception: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

   Exception: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

   Exception: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

   Exception: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

   Exception: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

Dezog Plugin: v2.1.0.35752 started. DZRP v2.0.0.

Dezog Plugin: Waiting for a connection on port 11000 (localhost)...

This looks like the plugin scanning, and is normal.  Does it keep running? 

(1 edit)

Yes, it does. But I previously ran an older version of CSpect and found no exception and warning.

I'm also experiencing this on a fresh install of KDE Neon.

I can provide my install steps to reproduce if it's of any use.

(1 edit)

Mike, this is what Sanchez Coder told me about issues with emulation of Aliens Neoplasma II. I hope it is helpful enough to your work on the emulator.

"The game does not work in newer versions of CSpect because bit 2 of register #22 does not turn off the original ULA interrupt. That's the main reason. In the old version of CSpect V2.12.36 this works properly, you can play the game in it.

The second point is related to copper co-processor, sound effects are not playing correctly because of this. So far they are not reproduced correctly in any version of CSpect."

(3 edits)

I've checked reg $22 and it does turn off ULA VBlanking. If I force it off, the game doesn't work at all.

The game also doesn't write anything other than 0 to this register, so isn't disabling it anyway.

How does the copper do the audio exactly? I am hearing sound effects on mine..?!?! (door open etc)

Unless I'm running an older version... But it looks like the one I'm running.

Thanks for your response. 
So it seems that it must be something else in CSpect V2.12.36 that makes the game working properly.
I can't say anything about audio argument. I just guess that in their perception of audio produced by Next hardware is not exactly the same as audio produced by the emulator.

BTW from my comparison of audio of the game on  CSpect V2.12.36 and the current version, sound effects on the latter are crystal clear while on the former are like muffled. 

Has anyone got the digital version of the next Head Over Heels.  I just got it, but Cspec does not see the file to run it

What do you mean "see"? If it's a .NEX file, it should work fine. What's the filename of it?

HeadOverHeels.nex

by  bat file have this in to run 

cspect.exe -w2 -tv -esc -zxnext -nextrom -com="COM6:115200" -mmc=TBBlue.img

I added it in my *.img folder

Start Cspec and browse till games, but when I click on name it does not show, even did just rename the folder to Heasd Over Hells, and the same



Don't run it via the OS, use this - run from the  HoH folder like this, where  <path> is the full path to CSpect.exe

<path>/CSpect -60 -vsync HeadOverHeels.nex

Or... run CSpect.exe then press F2 and browse to the HoH folder and select the .NEX file.

Just want to find out, if Cspec have also the menu to add pokes in, I saw a video that they press HMI button and then a menu appears that have poke in it

You could use the memory window in the debugger I guess....

Hey Mike, could you take a look, why new Aliens Neoplasma 2 inputs starts gliching on CSpect?

(1 edit)

Sorry, I don't have a copy of that so can't test it at the moment...

(4 edits)

Mike, could you test its free demo because it glitches as well?
Bugs I noticed are a player character sprite is not properly animated during walking and climbing ladder cycles. And interaction with in-game terminal console right after starting the game in the demo is automatically skipped.

okay - played it for a bit, didn't notice anything wrong.... going up ladders looked okay, and going to the console, the text came on as I thought it should. So not sure what you're seeing.....

(5 edits)

I launch the last version of emulator with its default settings, and open ANP2_DEMO.nex (next version 1.1 or 1.2) through F2 button. And I experience what I described in my previous comment. Sometimes when I move between screens walking animation starts working properly (for example by going back from second room in the game to first one) but once I move to another room it stops again. Sprites of walking and climbing look like shaking during movement when this issue occurs. After accessing terminal in first room it starts displaying first lines of text and skips to exit. The game's developers themselves confirmed that the next version of the game does not work properly on emulators. For example in this video at 1:15 animations and terminal work properly on original hardware after starting the game:

okay... I see it. I'm not sure this is something I can do on my own. It would require the creator to  debug the specific areas and let me know what's different. Otherwise.... I'd have to debug the whole game, and figure out the entire thing to even find the routines, never mind what'd wrong.

If they want to debug inside CSpect and figure out what's not working, I'll be happy to address it.... but without them, I'd be looking for a needle in a haystack. ☹️

How to run the new Basic 2.08 games..??

Create an image of the 2.08 SD card, then use that on the command line. If you download the ZIP file,  there's a program included that'll turn that into an image for you.

CSpect.exe -w4 -zxnext SDCard.img

There is no download link for a 2.08 image anywhere..?? In CSpect2_19_7_0.zip what program to use, and how to make the 2.08 image ?

2.08 comes with the KS2 machines  doesn't it? There's not a download for it yet. There might be a public release soon-ish...

The new program I put in the CSpect archive is Zip2SD for when it does appear.

Okay! I have an upgraded KS1 so I will try this. Thank you!

Hi, any plans to support RetroArch? 

It'd be great to see CSpect running in retro consoles like the Trimui Smart Pro.

probably not… as CSpect is in C#, these platforms would have to support that.


if you have any dev info for it, feel free to pass it along.

I see.

The only info I know is https://www.libretro.com/index.php/api/ (which provides an interface that maybe can be accessed through p/invoke or native delegates)

There you can also find a PDF about RetroArch.

(2 edits)

C# supports the OS these consoles use, like Linux for instance, so maybe there is a chance with a self-contained C# executable compiled for the target platform, provided the architecture of said platform is indeed supported.

Any news about this?

Hi,

    I'm not sure if this is a bug or not.   I'm trying to write some tools in Z80 assembly and I'm using CSpect to run/test things on.

    When I run cspect with an SD image and a .nex file, it appears like it's not loading the image.  e.g. 

bin\CSpect.exe -r -brk -w3 -60 -vsync -zxnext -nextrom -map=project.map -mmc=e:\nextdev\SDCard\cspect-next-4gb.img project.nex

The image I have has nextos 2.08 loaded, when my project.nex file runs, it checks the version of nextzxos, when it gets the value it's returning 2.02.  When I run the command on the command-line within the emulator using .nextver -v it returns 2.08.


Thoughts?

when the OS is running, it’ll return that properly, but if you run a .NEX file directly from the command line, it’ll return whatever value I’ve hacked in a while ago.

you can check nextreg 1 (or something) to see if it’s running under emulation or not.

(1 edit)

is there a way to make it load the OS, then load the .nex file?  If not, feature request :)

I copied the nex file to the image then ran it from the image and it pulls the correct version, so i'm guessing it's because it's not fully running the nextzxos.     Is that something that you can add in the future, so that it runs the OS, then starts the nex file?

Hi,

Thanks for fixing the cascading CTC issue.

I have another issues related to CTC and DMA in CSpect.

I am using DMA code to clear memory buffers, and it seems to affect the timing of the CTCs

When I use DMA and I cycle though the clock speeds using F6, the CTC counter will also speed up/slow down, but not in always predictable ways.

If I remove the DMA code, then using F6 has no effect on the CTCs.

It also seems to be size related with the DMA, smaller moves (eg 255 in size) dont seem to have the same effect on CTC, but large moves (eg $1000) do.

And running on ZXNext hardware works fine. 

(1 edit)

What are your CTC timer values, and I'll try and reproduce...

Edit: Never mind... I see why. Though it's not a simple fix, so it'll have to wait I'm afraid....

Ok, I'll move onto something else not CTC related.

But, is this DMA problem likely to cause issues elsewhere that I should be aware of, or is it limited to CTC?

I've no idea. From what I can tell, it's just the timers due to the way DMA clocks up used TStates. I  have change the DMA a little to be more accurate, though it'll never be perfect - but  that might  help.

Hello there

I was testing your latest version and I had no issues running .nex files but had no luck with .sna files, the log returns this error:

Exception: Non è possibile risolvere la dipendenza dall'assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' perché non è stata precaricata. Quando si usano API ReflectionOnly, gli assembly dipendenti devono essere precaricati o caricati su richiesta tramite l'evento ReflectionOnlyAssemblyResolve.

Then I tested it with your previous release and everything worked fine there.

Just thought you should know.

If it's an SNA file for the Next, then it'll need to be called SNX.
Are you running a NEXT SNA, or a 48k SNA?

Hello

Running latest CSpect  1 19 6 1 on a MAC M1 I get the error 

 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSPlaceholderDictionary initWithObjectsAndKeys:]: second object of each pair must be non-nil

Same for all the versions from 2_19_5_0 not tried with previous versions.

Running the command below with the 2 Gb image.

mono cspect.exe -w3 -basickeys -zxnext -nextrom -mmc=cspect-next-2gb.img -sound


Any suggestions on what is missing?

-sound can not be last, the game or image needs to be last.

try

mono cspect.exe -sound -w3 -basickeys -zxnext -nextrom -mmc=cspect-next-2gb.img

Deleted 221 days ago
(1 edit)

The command line should just be

C:/zxNext/CSpect/CSpect.exe -w4 -r -zxnext c:/zxNext/Cspect/Beast.nex

Cheers Mike.. I see my error -nextrom  (removed now works as expected.)

Fab!!! I'll try and put some additional error checking in, see if I can reduce these errors.

Hey Mike. I have been playing around with CTC timers/counters in Cspect and cannot get them to cascade, they only operate individually. Have confirmed that they cascade on real Next hardware. 

Is this a know issue?

I'm not sure. It's been in for a while, so I'm not sure what state it's in. One timer certainly works, but I'm unsure if anyone has used the cascading timers....
I'm also not sure what I used to test them, as I can't find any cascading demos...

If you have a simple example - with source, then I can take a look....

(+1)

Here is a simplistic sample that utilises 3 cascading CTC timers/counters to increment a counter every 1 second and displays the count on the screen.

In Cspect, the counter CTC2 does not cascade from the previous counters, which can be seen. Whereas, on Next hardware, the counter will tick over every second as expected.

https://github.com/blackcataussie/ZXNextCTC/blob/main/CTCTest.asm

k - I can confirm it's not as per hardware... Not sure what the issue is, or how it works mechanically...  tried a couple of combos without any luck, so will need confirmation from Alan  on how they actually work - or someone that can read the VHDL.

This is now fixed, and in the latest release.
CTC cascading timers don't use pre-scalers - which was my error. Now fixed. Many thanks for the sample.

Hi Mike. Have just tried 2.19.6.0 with the 2.07l distro. Running inder linux with mono. It will run fine without adding the .nex file to load on the command line.
If I add the .nex file to run on the command line it fails - see sample output below.


Same command line works with 2.19.5.1

mono CSpect.exe --zxnext=cspect -r -esc -tv -brk -w4  -zxnext -nextrom -map=../project.map -mmc=../../sdcard/cspect-next-2gb.img ../demo_3d.nex

#CSpect Start

Next ROM enabled

Unhandled Exception:

System.NullReferenceException: Object reference not set to an instance of an object

  at esxDOS.CRST8.CloseAllHandles () [0x00000] in <29fc5635479b49278035972ddca4cbbc>:0 

  at esxDOS.CRST8.Reset () [0x00000] in <29fc5635479b49278035972ddca4cbbc>:0 

  at a.O.C () [0x0001c] in <f076d33faaf04d5aa17584882cc10df4>:0 

  at A.r.F () [0x00000] in <f076d33faaf04d5aa17584882cc10df4>:0 

  at A.r.b (System.String ) [0x00004] in <f076d33faaf04d5aa17584882cc10df4>:0 

  at a.A.a (System.String[] ) [0x004ef] in <f076d33faaf04d5aa17584882cc10df4>:0 

[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object

  at esxDOS.CRST8.CloseAllHandles () [0x00000] in <29fc5635479b49278035972ddca4cbbc>:0 

  at esxDOS.CRST8.Reset () [0x00000] in <29fc5635479b49278035972ddca4cbbc>:0 

  at a.O.C () [0x0001c] in <f076d33faaf04d5aa17584882cc10df4>:0 

  at A.r.F () [0x00000] in <f076d33faaf04d5aa17584882cc10df4>:0 

  at A.r.b (System.String ) [0x00004] in <f076d33faaf04d5aa17584882cc10df4>:0 

  at a.A.a (System.String[] ) [0x004ef] in <f076d33faaf04d5aa17584882cc10df4>:0 

AL lib: (EE) alc_cleanup: 1 device not closed

what command line do you use?

Hi - the exception happens when I quite cspect so that seems "normal"!
As above, I used "mono CSpect.exe --zxnext=cspect -r -esc -tv -brk -w4  -zxnext -nextrom -map=../project.map -mmc=../../sdcard/cspect-next-2gb.img ../demo_3d.nex"

It seems to just exit back to the command prompt without running the .nex file.

(2 edits)

Sorry... not following. It dies at as soon as you run it?
I'm running it on my VM and it seems fine here... Can you try the  beast.nex demo? It's fine here.
That command line is a little odd...
CSpect -zxnext <file.nex>  
this is all you should need.

(2 edits)

ok, yes it works with your command line and beast and also with my demo_3d.nex file though the screen output is different but I can check that separately.

I will change my command line.

Thanks for your help :)

it looks like you need a space -mmc=[space]<path>, see my comment above, I've been experimenting with the different versions and command lines.

(1 edit) (+1)

The Level 9 Compilation for Spectrum Next has stopped working in CSpect 2.16.0 and later, it works fine in CSpect 2.15.2 and earlier. I used CSpect 2.15.2 when testing it for CSpect and that was a bit sloppy of me, I should have used the latest version.

The problem seems to be the esx_f_stat() function in Z88DK which uses the esxDOS F_STAT call. This function is used to determine if the game is a single-file game (gamedata.dat) or a multi-file game (gamedat1.dat, gamedat2.dat, ...). The esx_f_stat() function returns zero if the F_STAT call was successful and non-zero if an error occurred.

As I understand it, CSpect simulates a subset of the esxDOS calls on top of the host file system. In CSpect 2.15.2 and earlier, the simulated esxDOS F_STAT call worked fine when CSpect was started with the -mmc option and a specified directory. Maybe esxDOS F_STAT only works with an actual SD card image in CSpect 2.16.0 and later, and not in its simulated form?

For reference, this is the command-line used to start one of the games in the Level 9 compilation:

CSpect.exe -w4 -tv -zxnext -mmc=D:\level9.run\adventure-quest\ D:\level9.run\adventure-quest\level9_512.nex

(1 edit)

esxDOS has changed significantly, so it's possible. If I can get a hold of it, I'll take a look.
EDIT: got it here, and  see the issue - taking a look now.

(+1)

Now fixed, and uploaded

Thanks Mike, the new version works perfectly!

I does not open, when I run my bat file, it just close the bat file

(1 edit)

Do the included demos run? beast.bat etc.?
Does your batch file boot into 48K basic?  if so... add -zxnext to the command line.
I've a fix for this coming....

Thank you Mike, it is now running

I've updated to fix a n F2 load crash when you startup in 48k mode

I'm unable to start CSPECT booting with the Next rom, or launching my own code with no rom from the command line. The Next OS is Running a 2.06H rom.  Previously had no problems with earlier CSPECT versions.

MacOS Monterey 12.6

cheers Mike - I'll take  a look...

I'm running it fine  here... I unzipped into a clean folder and ran with
Foldertest\CSpect.exe  -w3 cspect-next-16gb.img
So not sure what's different with yours....
Does it run the included demos (beast, parallax, mod etc)?

(+1)

Thanks.

 Still no joy.

This is the output from terminal after running with a clean folder ~ \mono CSpect.exe  -w3 cspect-next-16gb.img

Unhandled Exception:

System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.dylib assembly:<unknown assembly> type:<unknown type> member:(null)

  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdiplusStartup(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)

  at System.Drawing.GDIPlus..cctor () [0x000b0] in <6bff38d4f68d4314b3cadf6dff6c9c99>:0 

   --- End of inner exception stack trace ---

  at System.Drawing.Icon.GetInternalBitmap () [0x00008] in <6bff38d4f68d4314b3cadf6dff6c9c99>:0 

  at System.Drawing.Icon.ToBitmap () [0x00018] in <6bff38d4f68d4314b3cadf6dff6c9c99>:0 

  at (wrapper remoting-invoke-with-check) System.Drawing.Icon.ToBitmap()

  at OpenTK.Platform.SDL2.Sdl2NativeWindow.set_Icon (System.Drawing.Icon value) [0x0001e] in <9314f5d039f340638e3a78d50aa1a6d0>:0 

  at OpenTK.NativeWindow.set_Icon (System.Drawing.Icon value) [0x00006] in <9314f5d039f340638e3a78d50aa1a6d0>:0 

  at A.y..ctor () [0x000b2] in <6a8159a131e9420581b0f73a3031e72c>:0 

  at a.Y.A (System.Int32 , System.Int32 ) [0x00016] in <6a8159a131e9420581b0f73a3031e72c>:0 

  at a.A.a (System.String[] ) [0x00343] in <6a8159a131e9420581b0f73a3031e72c>:0 

[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: libgdiplus.dylib assembly:<unknown assembly> type:<unknown type> member:(null)

  at (wrapper managed-to-native) System.Drawing.GDIPlus.GdiplusStartup(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)

  at System.Drawing.GDIPlus..cctor () [0x000b0] in <6bff38d4f68d4314b3cadf6dff6c9c99>:0 

   --- End of inner exception stack trace ---

  at System.Drawing.Icon.GetInternalBitmap () [0x00008] in <6bff38d4f68d4314b3cadf6dff6c9c99>:0 

  at System.Drawing.Icon.ToBitmap () [0x00018] in <6bff38d4f68d4314b3cadf6dff6c9c99>:0 

  at (wrapper remoting-invoke-with-check) System.Drawing.Icon.ToBitmap()

  at OpenTK.Platform.SDL2.Sdl2NativeWindow.set_Icon (System.Drawing.Icon value) [0x0001e] in <9314f5d039f340638e3a78d50aa1a6d0>:0 

  at OpenTK.NativeWindow.set_Icon (System.Drawing.Icon value) [0x00006] in <9314f5d039f340638e3a78d50aa1a6d0>:0 

  at A.y..ctor () [0x000b2] in <6a8159a131e9420581b0f73a3031e72c>:0 

  at a.Y.A (System.Int32 , System.Int32 ) [0x00016] in <6a8159a131e9420581b0f73a3031e72c>:0 

  at a.A.a (System.String[] ) [0x00343] in <6a8159a131e9420581b0f73a3031e72c>:0 

(1 edit)

Oh wow.... its crashing adding the icon to the window! What the actual hell!?!?!
Via Window.set_Icon() 

Does it work running any of the demos? Running the "beast.bat" file?

Oh wait... you're on MAC aren't you... interesting, might be a mono bug with the window icon. I can put a check around that for you. But please try the  supplied demos just to let me know it's consistent.

Ok, I tried starting the the nex files from  the demos, Beast, 3xAY, and tilemap test, they all failed with the previous console output.

Great bit of software, just wondered if this is able to run on the Steamdeck desktop os?

It's Linux based isn't it?  

As long as mono and OpenAL are installed, then it should manage. I've not got one to try I'm afraid...

Hi Mike, Do you know if the new Head over Heels for the Next will work.   Did see this in a message.  The full release should work on anything with 1 meg that supports the requested core revision. 

I haven't tried, but Flash did use CSpect to help develop so I believe so. However, it won't run at the moment as it's tuned to KS2 machines, and it'll have to wait until the KS1 version is released - I believe.

Did get this message, so it would work  "The paid versions will work on everything just about. The free version will only work on ks2 machines."

Do you know if it is possible that ZX Spectrum Next Launcher can work on Cspect

No idea, they'd have to test it.

Help need in creating an image for ZX Spectrum 2.08 if anyone can point me to an img file thx

#CSpect does not currently work with the latest distro. 2.06 is the highest it'll work with.

Managed to get CSPECT working with 2.08, on discord someone kindly posted a image.

Mmmmm... wonder how they managed that. The previous ones get stuck in a reset loop....

(1 edit)

Is the latest NextBASIC available in a CSPect image?

When I use the current "card image" from https://zxspectrumnext.online/ I notice differences in the NextBASIC that is documented in 'ZX Spectrum Next User Manual' (2023).  Statement like this is not accepted:  10 x,y=1,2

What's the version of each release, what's the latest version, etc?  

The newest version of the OS that'll run is  probably 2.06, this is due to  more hardware being emulated, and the newer OS's  going into  a reset loop.

As such, some of the features in the latest manual may not be available.

(2 edits)

Thanks (Now I see the other replies here regarding the issue)

Amazing work as always, looking forward to the OS fix so i can hopefully run the latest.

How do I make CSpect run in full screen.... I've tried somethings that were suggested to me, Nothing works yet....Simple instructions please. This pensioner struggles. Thanks

-fullscreeen on the command line

(1 edit)

I've just updated to this current version from v2.19.1.0 and I can't get it to boot - I just get a blank screen. 

I unzipped the new version into a new folder, copied across the two required .rom files from my old folder along with a couple of custom .bat files.

SD card image is from the sn-emulator-22.10a.zip download on the specnext.com/latestdistro page.

What am I missing? 🤔

The newest version of the OS that'll run is  probably 2.06

Later versions seem to force a software reset via NextReg 2 - which is newly emulated, and they get stuck in a reset loop.
So either use this version, or if you have an SD card with 2.07, then you'll need to use the previous CSpect until I can get around to fixing this...

(+1)

why does it say new version available?

I  simply haven't updated the remote version number yet - I'll do that tonight.This feature will likely be removed, as itch.io usually emails everyone anyway.

Amazing work 👍🤓