CPCWiki forum

General Category => Emulators => Topic started by: Arnaud on 09:14, 16 March 19

Title: CPCEC a new emulator from cngsoft
Post by: Arnaud on 09:14, 16 March 19
Hello,
i have just discovered this new emulator (release 14/03/2019), maybe the substitute of CPCE95 i still use.

Congratz to CNCSoft  :)

http://cngsoft.no-ip.org/cpcec.htm


Title: Re: CPCEC a new emulator from cngsoft
Post by: XeNoMoRPH on 12:11, 16 March 19
Yes , the other emulator is 10 years old , and there is another new ZX Spectrum emulator in the same web , ZXSEC

small videohttps://youtu.be/F5jC76gjt_U (https://youtu.be/F5jC76gjt_U)
Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 20:30, 17 March 19
Where are the particular strength of this emulator?

Title: Re: CPCEC a new emulator from cngsoft
Post by: XeNoMoRPH on 08:27, 18 March 19
Where are the particular strength of this emulator?
According to its author, It is made in C instead of assembler, it is much more correct internally than the previous CPCE, everything is done by keyboard, there are no menus
Title: Re: CPCEC a new emulator from cngsoft
Post by: roudoudou on 11:57, 18 March 19
According to its author, It is made in C instead of assembler, it is much more correct internally than the previous CPCE, everything is done by keyboard, there are no menus


This is cons, not strength 😁
Title: Re: CPCEC a new emulator from cngsoft
Post by: norecess on 13:43, 18 March 19
I tried the emulator with phX demo. Pretty encouraging ! Only the tunnel part (shown before Freddy) showed some visible artefacts. Plus FDC loading that slowed down audio, too. But all the rest was pretty accurate!

Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 18:59, 18 March 19
According to its author, It is made in C instead of assembler, it is much more correct internally than the previous CPCE, everything is done by keyboard, there are no menus


Ok, sounds it's quick then. Does it have a turbo mode?
Title: Re: CPCEC a new emulator from cngsoft
Post by: Arnaud on 20:43, 18 March 19
Where are the particular strength of this emulator?

Drag'n drop and auto start with a dsk file on my desktop shortcut.

Really quick to start a downloaded file.
Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 21:35, 18 March 19
Nice!  :)
Title: Re: CPCEC a new emulator from cngsoft
Post by: XeNoMoRPH on 20:49, 20 March 19
Version log
 
Title: Re: CPCEC a new emulator from cngsoft
Post by: dlfrsilver on 13:23, 22 March 19
Nice!  :)


the tapes are always started with turbo mode ;


it's 100% compatible with all games released on tape. Even the hardest schemes works with it. (MBC, Gremlin loader 1,2,3 for ex.).


I have tested CNGSOFT new emulator (i'm the alpha tester) against 1300 original CPC games, including 1000 games in their tapes versions.



Title: Re: CPCEC a new emulator from cngsoft
Post by: XeNoMoRPH on 11:52, 26 March 19
20190325 -- fourth public release. Onscreen indicators (hide them with -O); fixed bugs in ZXSEC that slowed emulation down when the frameskip wasn't zero, and another bug in audio recording on WAV files.

(http://cngsoft.no-ip.org/IMAGE_2019-03-19_12-07-01.PNG)(http://cngsoft.no-ip.org/IMAGE_2019-03-19_12-14-33.PNG)
Title: Re: CPCEC a new emulator from cngsoft
Post by: XeNoMoRPH on 20:52, 10 April 19
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 21:23, 07 May 19
(http://cngsoft.no-ip.org/image_2019-04-11_12-01-06.png) (http://cngsoft.no-ip.org/image_2019-04-27_14-16-01.png)
(http://cngsoft.no-ip.org/image_2019-04-14_15-25-13.png) (http://cngsoft.no-ip.org/image_2019-05-02_00-19-13.png)

* 20190419 -- eighth public release. Added options for image and sound interpolation; tape automatically rewinds itself when it reaches the end (à la FUSE); fixed a bug in TZX files that store 0 instead of 8 in the "used bits" field, another bug in CUSTOM INFO blocks in TZX files, and another one when ZXSEC loads a 48K SNA file in Plus3 mode (users should manually switch to a safe model beforehand anyway). INI files now remember the names of the last used files.

* 20190430 -- ninth public release. Softer B/W Spectrum palette; fixed bug in FDC sector size calculation if GAP datas are stored (Loriciels' discs); added simple memory contention to ZXSEC ("Amaurote", "Black Lamp", "Puzznic", "Sly Spy", "Zub"...).
Title: Re: CPCEC a new emulator from cngsoft
Post by: Arnaud on 21:30, 07 May 19
Hello,
i just tried your latest version, but i haven't found how disable the console window.

Is a way to hide the console or you still need it for debugging ?
Title: Re: CPCEC a new emulator from cngsoft
Post by: Fabrizio Radica on 23:10, 07 May 19
Hello,
i have just discovered this new emulator (release 14/03/2019), maybe the substitute of CPCE95 i still use.

Congratz to CNCSoft  :)

http://cngsoft.no-ip.org/cpcec.htm (http://cngsoft.no-ip.org/cpcec.htm)
any solution for Autotype like JavaCPC? :)
Title: Re: CPCEC a new emulator from cngsoft
Post by: reidrac on 08:48, 08 May 19
Very nice. I use CPCE a lot for development in Linux because is fast to start (and it works fine with WINE, better than WinAPE).

I see CPCEC doesn't do "proper" fullscreen and only maximizes the window. Other than that, I can see it replacing CPCE for my dev pipeline.
Title: Re: CPCEC a new emulator from cngsoft
Post by: XeNoMoRPH on 08:44, 14 June 19
Title: Re: CPCEC a new emulator from cngsoft
Post by: Gryzor on 15:08, 25 June 19
Anyone's got a direct link? Company firewall is blocking dynamic dns servers...
Title: Re: CPCEC a new emulator from cngsoft
Post by: Chinnery on 15:35, 25 June 19
Anyone's got a direct link? Company firewall is blocking dynamic dns servers...
http://cngsoft.no-ip.org/cpcec-20190526.zip

Title: Re: CPCEC a new emulator from cngsoft
Post by: Gryzor on 15:38, 25 June 19
Thanks man :)
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 12:18, 03 August 19
I just released a new version that (among other things) answers this question:

Hello,
i just tried your latest version, but i haven't found how disable the console window.

Is a way to hide the console or you still need it for debugging ?

* 20190731 -- eleventh public release. Added a new UI-based debugger (typing commands is no longer needed) and support for ZIP archive reading based on PUFF.C from the ZLIB project, upgraded GCC to 5.1.0 and removed all `inline` tags (they did more harm than good), and generally reworked all internals to make them OS-independent. Several details improved as well: the file selector fixes a bug in Win10, "browse tape" dialog shows the file name, Spectrum +3 automatically becomes +2A to load tapes, `auto rewind` shows up in Edit menu and fixes bugs in CSW files, and sound emulation has improved, for example "Terminus" on CPC plays sound and "Agent X II" on Spectrum is no longer noisy.

The console window is no longer a required part of CPCEC and ZXSEC; the sources still include the old debugger, but it's disabled by default.

(http://cngsoft.no-ip.org/IMAGE_2019-07-25_23-11-26.png)

(http://cngsoft.no-ip.org/IMAGE_2019-07-15_21-59-18.png)
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 13:41, 10 August 19
Small update:
20190809 -- minor patch restoring the "silent" discarding (i.e. without error codes) of write operations in read-only discs and allowing the automatic booting of IBM-formatted discs.

While it isn't a very faithful approach to the disc write protection, this should let several copy-protected games run straight from ZIP archives instead of complaining that the disc is read-only. Besides, AFAIK the opposite case never happens: no protection fails when the disc is NOT write-protected.

(http://cngsoft.no-ip.org/image_2019-08-10_12-40-44.png)

Ideally, this screen won't happen from now on.
Title: Re: CPCEC a new emulator from cngsoft
Post by: Gryzor on 16:50, 10 August 19
Yes, ideally dark blue on black won't happen again  :laugh:
Title: Re: CPCEC a new emulator from cngsoft
Post by: The_Mole_UK on 12:10, 12 August 19
Small update:
20190809 -- minor patch restoring the "silent" discarding (i.e. without error codes) of write operations in read-only discs and allowing the automatic booting of IBM-formatted discs.

While it isn't a very faithful approach to the disc write protection, this should let several copy-protected games run straight from ZIP archives instead of complaining that the disc is read-only. Besides, AFAIK the opposite case never happens: no protection fails when the disc is NOT write-protected.

(http://cngsoft.no-ip.org/image_2019-08-10_12-40-44.png)

Ideally, this screen won't happen from now on.
Can it use ParaDOS v1.2? / Remap keyboard?
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 21:01, 12 August 19
Can it use ParaDOS v1.2? / Remap keyboard?
(http://cngsoft.no-ip.org/IMAGE_2019-08-12_19-58-14.png)
Yes, all you have to do is to swap the default ROM files (AMSDOS and the original English-keyboard firmware) with your own ones. CPCEC will accept them as long as they're compatible, i.e. firmware is a 32k file where the first 16k is the BIOS and the last 16k is the BASIC, and the DOS ROM is 16k and includes a valid high ROM ID.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 14:06, 24 August 19
After posting a minor bugfix several days ago I'm already preparing the next major releases. On one hand, image interpolation is now based on three independent shaders whose effects pile up on the image.

(http://cngsoft.no-ip.org/IMAGE_2019-08-18_22-53-10.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-08-22_18-35-16.PNG)

On the other hand, extended memory (up to 32 ROM 16k banks and 8 RAM 64k banks) is the first step towards Amstrad Plus support. A very early step, but I can already see some screens and hear music...

(http://cngsoft.no-ip.org/IMAGE_2019-08-22_23-15-35.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-08-22_23-15-54.PNG)

When these features are ready, I'll get back to improving the overall compatibility of both CPCEC and ZXSEC, hoping to get the CRTC and FDC quirks and the ULA contention right sooner or later.

(http://cngsoft.no-ip.org/IMAGE_2019-07-28_15-10-19.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-04-14_15-26-46.PNG)
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 08:35, 03 September 19
The past weekend's release was a rushed one, fixing the ZIP archive "read-then-write" bug and adding 576 kB RAM support but disabling the still minimal PLUS ASIC emulation.

(http://cngsoft.no-ip.org/003103.PNG)

Video filters can now be configured independently, together with the scanline and interlace modes, sometimes leading to interesting effects. I like X-Masking and Double Interlace on my laptop, but I prefer Y-Masking and Whole Scanlines on my desktop.

(http://cngsoft.no-ip.org/CPCEC-20190831-4.PNG)

Plans for the near future include PLUS ASIC emulation for CPCEC, as stated in past messages, and memory contention for ZXSEC, where I'm rewriting the Z80 engine so it relies on macros that provide either "coarse" CPC timings (always aligned to 4 clock ticks and very predictable in their duration) or "fine" Spectrum timings (aligned to nothing and very volatile because of the address bus collisions) thus allowing both emulators to rely on the same Z80 files.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 14:48, 05 October 19
Before I get too busy with the CPC Retrodev compo, I updated CHIPNSFX, UZ80 and CPCEC with few news and many fixes:

(http://cngsoft.no-ip.org/IMAGE_2019-10-03_23-39-34.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-10-05_10-23-39.PNG)

* 20191004 -- Twelfth public release. Precise (albeit not perfect yet) memory contention and ULA noise ("snow") on Spectrum: "48K Timing Tests" passes all tests but 36 and 37, and "128K Timing Tests" fails on just six tests. "Mask 3: Venom Strikes Back" draws the attribute and border effects on their precise locations on all platforms (48K, 128K/Plus2, Plus3) and Software Creations' "Black Lamp", "LED Storm" and "Sly Spy" behave well on 128K machines. Improvements in the debugger: fixed disassembly panel invalid cursor locations, added optional tall characters, avoided debug+pause clashing, new key M toggles memory dump ROM+RAM and RAM-only modes. Improved ZIP handling (ZIP archives are no longer locked, files within archives are filtered by extension), user interface fixes.
* 20191004 -- Minor patch making the debugger options set with V and M stick between sessions.

(http://cngsoft.no-ip.org/IMAGE_2019-10-02_21-39-51.PNG)

I'd have liked to fix the CRTC bug that makes the recently released and spectacularly smooth "Pinball Dreams" unplayable but the deadline looms :-(
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 21:43, 18 November 19
I just released a new version of CPCEC and its little sibling ZXSEC, mainly because I had to support "Pinball Dreams" in one way or another!

(http://cngsoft.no-ip.org/IMAGE_2019-11-16_11-16-00.PNG)
(http://cngsoft.no-ip.org/IMAGE_2019-11-12_19-51-23.PNG)

Instead of trying to develop all CRTC types at once I focused on CRTC 1. "Mission Genocide", "Warhawk", "Dynamic Duo", "Prehistorik 2", "From Scratch", "Batman Forever", "Imperial Mahjong", "Octopus Pocus" and many more work flawlessly now, instead of the fragile balance where some tweaks fixed some titles and broke others. Sadly, the fragile balance has now shifted to CRTC 1 against all the other types... so there's still a lot of work to do.

(http://cngsoft.no-ip.org/IMAGE_2019-11-17_10-14-28.PNG)
(http://cngsoft.no-ip.org/IMAGE_2019-10-26_20-37-18.PNG)

New options include a basic V-Hold control (now the original "Thunder Blade" release works) and a flexible H-sync mode that allows fine-tuning Gigascreen effects such as the "Batman/Spawn" screen in "Batman Forever" together with the already extant interlaced mode options.

ZXSEC also benefits from increased precision in memory contention timings, especially on 48K. There's no longer conflict between "Starion", "Dark Star", "Black Lamp" and others that were drawing special effects on the border and the attribute map at once.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 21:19, 24 November 19
(http://cngsoft.no-ip.org/IMAGE_2019-11-23_21-55-33.png) (http://cngsoft.no-ip.org/IMAGE_2019-11-23_22-28-05.png)

Emulating the CRTC type 1 was the first step towards full "Pinball Dreams" support. CRTC 0 is now half done and some demos that either worked in early versions of CPCEC thanks to kludges ("Nayad" part of "5KB Demo 3") or didn't work at all ("Tantrum" part of "Face Hugger's Ultimate Megademo") are now fully operational. "Pinball Dreams" itself still resists, though.

(http://cngsoft.no-ip.org/IMAGE_2019-11-24_19-53-53.png)
Title: Re: CPCEC a new emulator from cngsoft
Post by: Ast on 23:03, 24 November 19
Hi César,


To complete your crtc 1 emulation, try to make runable Scroll Factory (http://www.pouet.net/prod.php?which=76731).


It would be a good challenge for you and a good way to make your cpcec better.


Have a good fun.

Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 22:03, 26 November 19
Hi César,

To complete your crtc 1 emulation, try to make runable Scroll Factory (http://www.pouet.net/prod.php?which=76731).

It would be a good challenge for you and a good way to make your cpcec better.

Have a good fun.

Good suggestion. This is how it looks like right now:

(http://cngsoft.no-ip.org/IMAGE_2019-11-26_20-37-10.PNG)
(http://cngsoft.no-ip.org/IMAGE_2019-11-25_21-44-35.PNG)
(http://cngsoft.no-ip.org/IMAGE_2019-11-26_20-36-57.PNG)

CPCEC simulates a 2 NOP delay on MCR changes (Imperial Mahjong needs either 2 or 3 NOPS to behave properly); if I set the delay to 0 or 1, the title of Scroll Factory improves:

(http://cngsoft.no-ip.org/IMAGE_2019-11-26_20-46-18.PNG)

I'm going to have to ask so many questions about the internal delays that happen between the Z80, the Gate Array and the CRTC. I better start writing them down already.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 22:42, 02 December 19
I released yesterday morning a new version of CPCEC, but it's a minor patch fixing bugs such as bad window rendering when the screen isn't tall enough (for example my current laptop), recording the wrong value in the bytes/second field of WAV files, or failing to keep OUT &0088,&88 from going to the Gate Array ("Knight Rider"). The FDC can now format tracks, a feature that I had dummied out until I was advised to enable it.

(http://cngsoft.no-ip.org/IMAGE_2019-11-24_14-53-35.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-11-24_14-53-51.PNG)

"Still Rising" (CRTC 0 and 1) and "Octopus Pocus" (CRTC 1) join the list of CPC demos that work. "PhX" temporarily loses sync in two different parts depending of the CRTC type. "Pinball Dreams" doesn't run on CRTC 0 or 2 yet, but it works well on CRTC 3 and 4, although only because the game expects them to behave like CRTC 1 regarding the "buffered" CRTC registers 4, 5 and 9. This goes against Shinra's document "Differences between CRTC types" stating that CRTC types 3 and 4 are like CRTC 0 and 2 in this aspect. Who's right?



Title: Re: CPCEC a new emulator from cngsoft
Post by: Ast on 23:38, 02 December 19
Hi @cngsoft (http://www.cpcwiki.eu/forum/index.php?action=profile;u=191)


I've just tested CPCEC right now. There's still some work to do on Scroll Factory's intro.


Your emulator begins better and better each day. Do you plan adding Amstrad Plus emulation ?

Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 15:12, 09 December 19
A change in the behavior of REG1 finally makes the level start SFX of "Zap't'Balls advanced edition" work properly and improves "Onescreen Colonies":
(http://cngsoft.no-ip.org/IMAGE_2019-12-07_22-43-38.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-12-09_18-44-44.PNG)

Hi @cngsoft (http://www.cpcwiki.eu/forum/index.php?action=profile;u=191)

I've just tested CPCEC right now. There's still some work to do on Scroll Factory's intro.

Your emulator begins better and better each day. Do you plan adding Amstrad Plus emulation ?
Scroll Factory is indeed still incomplete, as I showed in the past screenshots. Either the mode change happens too late or the video rendering happens too soon. I know that there's a delay between what the Z80 does and what the screen shows, but I don't know its nature and its length, or whether it's just one delay or several types of it.

Amstrad Plus is in the queue too, and in a past message I posted a screenshot of "Burnin' Rubber" running on incomplete ASIC emulation.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 15:46, 27 December 19
I hope everyone had a merry Christmas. Mine was certainly productive:

1.- The emulation of delays in the Gate Array both to update the bitdepth and to render the pixels solves all the glitches in "Scroll Factory":
 (http://cngsoft.no-ip.org/IMAGE_2019-12-24_12-31-55.PNG)  (http://cngsoft.no-ip.org/IMAGE_2019-12-24_12-31-38.PNG)

2.- These delays also enable the handling of the slightly different case of mid-char ink changes:
 (http://cngsoft.no-ip.org/IMAGE_2019-12-24_21-14-48.PNG)  (http://cngsoft.no-ip.org/IMAGE_2019-12-24_21-29-13.PNG)

3.- OUT &BC00,8: OUT &BD00,1 makes the screen shake:
 (http://cngsoft.no-ip.org/IMAGE_2019-12-26_12-59-23.PNG)

4.- Last but not least, "Pinball Dreams" is now fully supported on all CRTC types: the BG Games intro, the Gigascreen titles, the staff scroller and the game itself behave and show as expected.
 (http://cngsoft.no-ip.org/IMAGE_2019-12-26_23-19-08.PNG)

Shall I post the current files online?
Title: Re: CPCEC a new emulator from cngsoft
Post by: remax on 17:48, 27 December 19
Hoffe Kourçe
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 18:47, 28 December 19
Hoffe Kourçe
Yes of course :-) Alright then, CPCEC-20191227 is available from my website as usual.

(http://cngsoft.no-ip.org/IMAGE_2019-12-20_23-14-57.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-12-28_00-37-42.PNG)
(http://cngsoft.no-ip.org/IMAGE_2019-12-28_00-51-45.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-12-28_00-51-54.PNG)

20191227 -- fourteenth public release. Visual improvements: the green screen palette is closer to the original, the vertical filters ("Y-Masking") are compatible with the interlaced modes, mixing X-Masking and Y-Masking together shows a checkered patter. Internal improvements: the new traits of the CRTC registers 3 and 9 and the delays between the Gate Array, the Z80 and the CRTC finally can emulate "Pinball Dreams" as a whole for all the CRTC types and solve the problems in several demos ("Scroll Factory", "Still Rising", parts of "The Demo"...) and games ("Action Fighter", "Storm Warrior", "Usagi Yojimbo"), although some titles still need particular CRTCs ("PhX" CRTC0, "Onescreen Colonies" CRTC1, etc.) to work correctly.

(http://cngsoft.no-ip.org/IMAGE_2019-12-25_14-04-55.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-12-28_15-00-26.PNG)

I also released "Epimetheus +", an improved edition of my CPC Retrodev 2019 submission, with medals to pick up, smoke trails to spice the visuals up, and a softer difficulty curve for the first 20 levels.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 22:12, 31 December 19
Just in time for the very last three hours of the year...

(http://cngsoft.no-ip.org/IMAGE_2019-12-30_23-02-11.PNG) (http://cngsoft.no-ip.org/IMAGE_2019-12-31_21-10-34.PNG)

20191231 -- minor patch fixing a bug in the FDC (bit 6 of SENSE DRIVE STATUS must react when the user changes discs: "Fugitif") and a regression in CRTC0 (detect REG6<REG4 rather than REG6<=REG4: "5KB Megademo 3: Nayad"). Happy new year 2020!

Thanks to Dlfrsilver for bringing "Fugitif" back to my attention! Happy New Year, everyone!
Title: Re: CPCEC a new emulator from cngsoft
Post by: robcfg on 00:23, 01 January 20
Great work!


Wish you a Happy New Year!
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 12:00, 02 January 20
The New Year's Eve update broke "Scroll Factory" and others :-( Never rush an update without testing it properly! So yesterday evening I had to make a second minor patch solving the issues caused by the first one:

(http://cngsoft.no-ip.org/IMAGE_2020-01-01_23-35-02.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-01-02_11-04-36.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-01-01_18-57-18.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-01-02_11-03-58.PNG)

20200101 -- minor patch fixing a regression in CRTC0 caused by the previous patch ("Scroll Factory", intro of "Pinball Dreams", "Overflow Preview: Part 1") and improving its heuristics ("Overflow Preview: Part 3").
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 00:02, 23 January 20
I'm busy and I cannot spend enough time on CPCEC, but I've been fixing bugs in the FDC TRACK FORMAT command, improving the disc timings, supporting more copy protections ... and slowly, very slowly, adding Plus hardware support.

(http://cngsoft.no-ip.org/IMAGE_2020-01-22_20-50-31.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-01-22_19-49-04.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-01-22_20-50-59.PNG)

Hardware sprites are half baked; soft scroll, DMA channels and vector interrupts aren't emulated yet; but several cartridges are already playable, beginning with the very first one: "Burnin' Rubber".
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 14:11, 25 January 20
Current state of affairs: the sixteen original cartridges I'm aware of are working correctly.
(http://cngsoft.no-ip.org/IMAGE_2020-01-23_19-21-49.png) (http://cngsoft.no-ip.org/IMAGE_2020-01-24_16-42-18.png)
(http://cngsoft.no-ip.org/IMAGE_2020-01-23_23-15-18.png) (http://cngsoft.no-ip.org/IMAGE_2020-01-23_23-15-35.png)
(http://cngsoft.no-ip.org/IMAGE_2020-01-24_23-21-06.png) (http://cngsoft.no-ip.org/IMAGE_2020-01-24_23-23-55.png)

I've already tested several non-commercial titles and demos and they work, too:
(http://cngsoft.no-ip.org/IMAGE_2020-01-23_19-56-50.png) (http://cngsoft.no-ip.org/IMAGE_2020-01-24_20-53-09.png)

However, "Fluff" is playable but the horizontal scroll is glitchy, and "Prehistorik 2" is missing the hard sprites and crashes on vertical scrolling.
(http://cngsoft.no-ip.org/IMAGE_2020-01-25_11-12-41.png) (http://cngsoft.no-ip.org/IMAGE_2020-01-25_11-13-35.png)

I'm sticking to http://www.cpcwiki.eu/index.php/Arnold_V_Specs_Revised but some details are more obscure than others.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 02:08, 01 February 20
After lots of problems, "Fluff" and "Prehistorik 2" for Plus work well at last!

(http://cngsoft.no-ip.org/IMAGE_2020-01-26_10-22-00.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-02-01_00-25-03.PNG)

PH2+ took forever, there were errors in the DMA emulation (used here as a timer) and in the algebra that locates sprites within the visible screen.

(http://cngsoft.no-ip.org/IMAGE_2020-01-31_22-44-23.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-01-31_22-49-57.PNG)

The next release will have to wait until I solve CPCEC's license issues with the university (remember, it was my master's degree final project). In hindsight, all the past releases should have stayed as private alphas :-(
Title: Re: CPCEC a new emulator from cngsoft
Post by: tjohnson on 12:15, 01 February 20
Sounds great.  License issues with a university project!  I hope you get that resolved soon, would never have thought that could happen.
Title: Re: CPCEC a new emulator from cngsoft
Post by: Gryzor on 16:40, 17 February 20
I wouldn't expect something like this having licensing issues outside the USA to be frank but what do I know... in any case, awesome series of updates!
Title: Re: CPCEC a new emulator from cngsoft
Post by: reidrac on 18:49, 17 February 20
I would assume that any project made as part of the university course could be property of the university, or shared, or something like that.

Same as when you work on something paid by your employer; you don't own it (unless your contract says do).
Title: Re: CPCEC a new emulator from cngsoft
Post by: Gryzor on 19:28, 17 February 20
The discussion is much more nuanced though; if it's a public University an argument can be made for public domain.
Title: Re: CPCEC a new emulator from cngsoft
Post by: reidrac on 20:32, 17 February 20
Actually, I thought the code was GPL. So it couldn't be clearer, unless there's any copyright not covered by that.

Anyway, we're guessing and derailing a bit the thread. Apologies.

It is an excellent emulator and it gets better and better. I hope the issue gets sorted and we can all enjoy it legally.
Title: Re: CPCEC a new emulator from cngsoft
Post by: tjohnson on 22:56, 17 February 20
I would assume that any project made as part of the university course could be property of the university, or shared, or something like that.

Same as when you work on something paid by your employer; you don't own it (unless your contract says do).


In the UK University now costs a small arm and leg and unless using code provided and owned by the university I would expect to be the owner of anything produced.  Work is a different story where they are paying you, but this in the UK is the other way round you are paying them now.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 01:03, 01 March 20
Well, it's done. CPCEC 20200229 is out, with Amstrad Plus emulation, source files within the package, everything.

The license problems were more of a big misunderstanding than anything else. I was actually quite dumb and I should have asked the questions much sooner :-( Besides, some titles gave me trouble until very few days ago.

(http://cngsoft.no-ip.org/IMAGE_2020-02-22_10-06-54.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-02-22_10-07-14.PNG)

The less I say about demos the better, too...

(http://cngsoft.no-ip.org/IMAGE_2020-02-12_20-41-07.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-02-12_20-41-38.PNG)

Still, CPCEC and ZXSEC are coming closer towards the goal of "dogfooding": organisations ought to use their own products, don't they?

EDIT: the original upload had a mistake because of a dumb oversight (saving changes AFTER compiling the files!); I replaced the package two hours later.
Title: Re: CPCEC a new emulator from cngsoft
Post by: roudoudou on 11:10, 01 March 20
The less I say about demos the better, too...
Hi CNG, it looks (obviously) like a timing issue on SPLT register and SSRon a Plus, the soft scroll register had almost immediate effect (on the next screen "word")the split register adress is loaded in the Asic-CRTC at the end of the displayed screenfor the "face+vector balls" part, the CRTC is set to 256 bytes long so i guess your emulation do not reset to next adress until it's fully displayed (but this cannot be displayed)i guess that because the rubber bar use almost the same split routine -> with different CRTC settings but the split is triggered the same way, very conventionnal for a Plus++
Title: Re: CPCEC a new emulator from cngsoft
Post by: norecess on 13:32, 01 March 20
Excellent work @cngsoft (https://www.cpcwiki.eu/forum/index.php?action=profile;u=191) , adding Amstrad Plus abilities + distributing source-code = major win for me.

On top of what @roudoudou (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1714) just said, I'm wondering if you could also focus for next release on supporting Eerie Forest by Logon System (https://www.pouet.net/prod.php?which=72271 (https://www.pouet.net/prod.php?which=72271)). There are many issues with the horizontal scrollers. I believe that once you will get this demo 100% fixed, many other productions will be able to run smoothly.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 13:37, 07 March 20
I haven't been able to work too much on CPCEC, but I just released a bugfix avoiding a hang in  'globbing()', extending the compatibility of snapshots (WinAPE and ACE don't handle CPC+ blocks the same way) and moving some OS-independent code from CPCEC-OS.H to CPCEC-RT.H.

(http://cngsoft.no-ip.org/IMAGE_2020-03-01_17-15-19.png) (http://cngsoft.no-ip.org/IMAGE_2020-03-01_17-16-16.png)

@roudoudou (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1714), @norecess (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2409), I can't wait to find why "CRTC 3" and "Eerie Forest" are acting up, though at least the damages are relatively limited: no crashes, no broken timings, just screen offsets not getting calculated and updated as intended.
Title: Re: CPCEC a new emulator from cngsoft
Post by: roudoudou on 13:48, 07 March 20
did you try my ACID test split cartridge in the ACID topic ?
all CRTC3 is doing the same split technic, very + compliant (i'm not mixing CRTC split + SSR register)
so the basics are:
set SPLIT LINE + SPLITADR before the end of the displayed line THEN...       ...out of the visible screen, modifying the SSR (or SSCR) because it has immediate effect
the SSR allow to "choose the block" then you have to substract the block value from the current block value to get the block you want because the BLOCK value is in fact a block shifting :)
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 21:12, 09 March 20
did you try my ACID test split cartridge in the ACID topic ?
all CRTC3 is doing the same split technic, very + compliant (i'm not mixing CRTC split + SSR register)
so the basics are:
set SPLIT LINE + SPLITADR before the end of the displayed line THEN...       ...out of the visible screen, modifying the SSR (or SSCR) because it has immediate effect
the SSR allow to "choose the block" then you have to substract the block value from the current block value to get the block you want because the BLOCK value is in fact a block shifting :)
Your statement about the "immediate effect" is leading me somewhere:

(http://cngsoft.no-ip.org/IMAGE_2020-03-09_19-59-00.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-03-09_19-59-06.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-03-09_19-59-12.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-03-09_19-59-20.PNG)

It's not right yet but it's beginning to take shape, we're on the right track.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 21:42, 14 March 20
It's the first anniversary of CPCEC.

(http://cngsoft.no-ip.org/IMAGE_2020-03-14_19-53-53.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-03-14_19-54-34.PNG)

Possibly not the best reason for posting a new release, but this minor patch solved several issues in "Eerie Forest" and "CRTC3", so I thought I could publish the new files.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 16:18, 01 April 20
New release of CPCEC just in time for the April showers (let's hope the rain washes the virus away) albeit a minor one focusing on Amstrad Plus special effect bugfixes:

(http://cngsoft.no-ip.org/IMAGE_2020-03-29_12-20-32.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-03-28_14-00-14.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-03-24_09-47-42.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-03-26_14-14-52.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-03-26_21-59-55.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-03-26_23-16-08.PNG)

I really need to write stereo sound into the next release, and to understand why the Gate Array's scanline counters used to trigger IRQs sometimes run faster than intended.

I published a new version of CHIPNSFX too, with some tweaks and several new songs, and I should clean UZ80 up and release a new package as well.
Title: Re: CPCEC a new emulator from cngsoft
Post by: norecess on 21:00, 01 April 20
This is getting better and better. Keep up the good work !  ;)
Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 18:00, 02 April 20
Cool how quick this one does evolve!  :) :) :)


Are you going to support more hardware expansions? Well, I mean the easy stuff.  :)
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 12:52, 05 April 20
New version 20200404: thanks to @norecess (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2409) for helping me find the DMA bug that required a million ASIC PLUS kludges... they're mainly gone now with the exception of "Black Sabbath" that somehow expects IRQs to happen one scanline too soon.

(http://cngsoft.no-ip.org/IMAGE_2020-03-29_14-21-56.png)
(http://cngsoft.no-ip.org/IMAGE_2020-04-03_19-03-21.png)

Cool how quick this one does evolve!  :) :) :)

Are you going to support more hardware expansions? Well, I mean the easy stuff.  :)

I'm afraid I already struggle too much with the base hardware; expansions will have to wait until CPCEC is more solid. That being said, it already emulates up to 576k RAM (X-MEM, demo "Postscriptum") and 512k ROM (PLUS cartridges, either real or custom-made by gluing multiple 16k ROM files together)
Title: Re: CPCEC a new emulator from cngsoft
Post by: roudoudou on 13:51, 05 April 20
I'm afraid I already struggle too much with the base hardware; expansions will have to wait until CPCEC is more solid. That being said, it already emulates up to 576k RAM (X-MEM, demo "Postscriptum") and 512k ROM (PLUS cartridges, either real or custom-made by gluing multiple 16k ROM files together)
As the CPC can manage 256 Roms, please allow a super extension with 256 ROM and not a tiny amount of 16 or 32 like most of emulators ;)
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 11:57, 06 April 20
Super minor update restoring the missing top left sprites of "Synergy 4" after I realised that a temporary buffer (in this case the sprite coordinates) enables monitoring softwares racing the beam to achieve this kind of visual effect.

(http://cngsoft.no-ip.org/IMAGE_2020-04-06_09-34-16.PNG)

EDIT: made a new package because of an oversight.
Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 13:09, 06 April 20
As the CPC can manage 256 Roms, please allow a super extension with 256 ROM and not a tiny amount of 16 or 32 like most of emulators ;)
Actually 64 would be enough (IMHO), that's a X-MEM + Y-MEM. Only one of my CPCs has an (internal) 2,5 MB of ROM - which I still not use completely. :)
Title: Re: CPCEC a new emulator from cngsoft
Post by: Ast on 13:58, 06 April 20
Super minor update restoring the missing top left sprites of "Synergy 4" after I realised that a temporary buffer (in this case the sprite coordinates) enables monitoring softwares racing the beam to achieve this kind of visual effect.

(http://cngsoft.no-ip.org/IMAGE_2020-04-06_09-34-16.PNG)


it's a good thing to see my old Synergy demo working.
Title: Re: CPCEC a new emulator from cngsoft
Post by: roudoudou on 14:19, 06 April 20
Actually 64 would be enough (IMHO), that's a X-MEM + Y-MEM. Only one of my CPCs has an (internal) 2,5 MB of ROM - which I still not use completely. :)
Please, we must avoid the race to the bottom... The CPC can manage 256 ROM, let the emulator manage 256 ROM...

Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 17:20, 06 April 20
Please, we must avoid the race to the bottom... The CPC can manage 256 ROM, let the emulator manage 256 ROM...
Oh, I'm totally at your side.  ;D
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 12:16, 18 April 20
More bugs bite the dust and more demos are supported!

(http://cngsoft.no-ip.org/IMAGE_2020-03-16_19-26-56.png) (http://cngsoft.no-ip.org/IMAGE_2020-03-31_09-20-20.png)

"Black Sabbath", "Imperial Mahjong", "Onescreen Colonies" and "Scroll Factory" were fighting each other (i.e. I wasn't able to make them all work at once, whenever one ran well another one failed) until I realised that the two-line IRQ reset counter starts when the VSYNC begins UNLESS the HSYNC ends at the same time AND we're on a classical CPC rather than an ASIC-powered one; in that case the counter starts one scanline later.

(http://cngsoft.no-ip.org/IMAGE_2020-04-17_23-55-55.png) (http://cngsoft.no-ip.org/IMAGE_2020-04-18_00-31-03.png)

"Tire au Flan" behaves differently on a Plus, but CPCEC didn't understand its detection method: setting the PIO port A on write mode, then reading from it, should return zero on non-Plus hardware.

I have yet to come up with OS-independent stereo sound and hardware+ROM profiles. Meanwhile I've already begun reading the X11 and ALSA specs, the most standard window and audio interfaces for Linux that I'm aware of.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 20:51, 18 April 20
After spotting and fixing a dangerous bug in the ZIP archive handler, I decided that the current changes were sufficient for a new public release, albeit a minor patch, available from http://cngsoft.no-ip.org/cpcec.htm (http://cngsoft.no-ip.org/cpcec.htm) as usual:

(http://cngsoft.no-ip.org/IMAGE_2020-03-30_23-21-47.png) (http://cngsoft.no-ip.org/IMAGE_2020-04-17_23-39-33.png)

- 20200418 -- minor patch with improvements in the interrupt counter (it starts with the first HSYNC fall after the VSYNC rise -"Onescreen Colonies"- unless on PLUS where it can start when the VSYNC rise happens together with the HSYNC fall: "Black Sabbath"), the PIO Port A (it returns zero when reading it in write mode unless on PLUS where it returns 255: "Tire au Flan") and the debugger: disassembly parameters are vertically aligned and the hardware information panel is aligned to the ASCII memory dump. Fixed a bug in the ZIP archive header seeker.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 12:01, 19 April 20
I rebuilt the package after noticing yesterday night that I had left two things unfinished and undocumented:

(http://cngsoft.no-ip.org/IMAGE_2020-04-19_10-31-18.png) (http://cngsoft.no-ip.org/IMAGE_2020-04-19_10-31-25.png)

- 20200418 -- minor patch with improvements in the interrupt counter (it starts with the first HSYNC fall after the VSYNC rise -"Onescreen Colonies"- unless on PLUS where it can start when the VSYNC rise happens together with the HSYNC fall: "Black Sabbath"), the hardware ports (PIO port A returns zero when reading it in write mode unless on PLUS where it returns 255 -"Tire au Flan"-, PIO port B must set VSYNC in the middle of the screen when the CRTC requests it -"Chany Dream End Megademo"- and the Gate Array's 0-191 byte range requires a more rigid port logic -"Overflow Preview 3"-) and the debugger: disassembly parameters are vertically aligned and the hardware information panel is aligned to the ASCII memory dump. Fixed a bug in the ZIP archive header seeker, too.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 14:00, 24 April 20
CPCEC and ZXSEC are getting a SDL2 port, but it's going to take longer than expected because I must write the new GUI from scratch as the SDL functions don't provide any widgets.

(http://cngsoft.no-ip.org/SLITAZ5-COOKING-20200423-1058.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-04-24_11-18-12.png)

It already runs well on a couple of Linux systems (Slitaz and Ubuntu) and it's also useable on Windows even if that wasn't the point of making the SDL2 port to begin with.
Title: Re: CPCEC a new emulator from cngsoft
Post by: Aeliss on 19:51, 24 April 20
Hello, do you think it will be possible to use the sdl menu with a joypad ?
It will be easier to use it from a couch without using the keyboard.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 19:32, 30 April 20
It's official, the 16th public release of CPCEC is out: SDL2 support (complete with precompiled GNU/Linux 32-bit files, custom user interface -press F10 to show the menu- and other cross-platform adaptations), Z80 fixes that reduce the mistakes of the RAXOFT test suite (Z80CCF goes down from 70 to 5 mistakes out of 152, Z80FULL drops from 10 mistakes to 8, and Z80MEMPTR drops to 4 to 0 mistakes) and the new extended ROM profile system based on simple INI files, for example:

Code: [Select]
lowest=fw315en.rom
high02=sym-roma.rom
high03=sym-romb.rom
high04=sym-romc.rom
high05=sym-romd.rom

Whose only hard requirement is that the ROM files must be in the same folder where the INI file is.

(http://cngsoft.no-ip.org/IMAGE_2020-04-24_18-38-36.png) (http://cngsoft.no-ip.org/IMAGE_2020-04-25_11-25-13.png)
(http://cngsoft.no-ip.org/IMAGE_2020-04-30_19-10-06.png) (http://cngsoft.no-ip.org/IMAGE_2020-04-29_12-06-57.png)

Hello, do you think it will be possible to use the sdl menu with a joypad ?
It will be easier to use it from a couch without using the keyboard.
You're as bound to use the keyboard sooner or later as with a real CPC, but alright, I'll consider your suggestion for future releases.
Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 21:44, 30 April 20
Here are some tests you can do to see if the emulation is accurate:


- Install XDDOS 2.10 ROM and see if the system starts u
- Install FutureOS and copy from disc to disc (disc or file, check both)
- "" Use OS-Infos Tool to see if the expansion RAM can be detected

Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 16:33, 05 May 20
I released a couple of bugfixes during the past days:
* 20200503 -- minor patch improving the behavior of the Z80 operations INI, IND, INIR, INDR, OUTI, OUTD, OTIR and OTIR: the 2012 RAXOFT tests (Z80CCF, Z80FULL and Z80MEMPTR) score zero errors. Slightly more precise automatic frameskip.
* 20200505 -- minor patch focused on the SDL2 toolkit: fixed a bug when confirming overwriting files, and improved file browsing across directories by pointing by default to the previous directory.

Here are some tests you can do to see if the emulation is accurate:

- Install XDDOS 2.10 ROM and see if the system starts u
- Install FutureOS and copy from disc to disc (disc or file, check both)
- "" Use OS-Infos Tool to see if the expansion RAM can be detected
FutureOS succeeded at making a copy of the ZEXALL disc from drive A: to drive B: as seen in the screenshots:

(http://cngsoft.no-ip.org/IMAGE_2020-05-04_00-28-55.png) (http://cngsoft.no-ip.org/IMAGE_2020-05-04_00-29-17.png)
(http://cngsoft.no-ip.org/IMAGE_2020-05-04_00-32-53.png) (http://cngsoft.no-ip.org/IMAGE_2020-05-04_00-32-55.png)

FutureOS crashed when I tried opening the ramdisk at drive M: ; the same happens on WinAPE when inserting the same cartridge (English)+AMSDOS+FW3.15+WithoutMenu.cpr and examining the ramdisk.
Title: Re: CPCEC a new emulator from cngsoft
Post by: GUNHED on 17:18, 05 May 20
Thanks for testing. I'll have a look what's the problem with M regarding real CPC and emulators.
Your FDC routines (and others) seem to be very faithful. Great work!!!  :) :) :)

EDIT: The crash when DIRectory of M seems to depend on the data in RAM &CC. It's not a problem of the emulation, more a problem in sorting the DIR which is not used. Will fix that.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 07:28, 09 May 20
TL;DR:
(1) Congratulations cngsoft for this extraordinary work!
(2) I can offer contribution in convenience feature (telling from command line to run something, and exit when CPC resets).

I tested the emulator on Ubuntu 20.04 (actually Xubuntu). It compiles easily, runs smoothly with low CPU consumption.   :)

 8) CPCEC is on a good way to replace caprice32 as my test-run emulator and debug emulator.  8)

I usually test-run my prods with caprice32.

Pros: caprice32 is open-source with public history, lightweight, easy to build, has menus, can be instructed from command line to run some command and exit on next CPC reset since I contributed some code to that effect (Scriptable wait point command-line option CAP32_WAITBREAK · Issue #110 · ColinPitrat/caprice32 (https://github.com/ColinPitrat/caprice32/issues/110)).
Cons: imperfect fullscreen handling, ageing dependency (SDL 1), emulation probably imperfect (yet sufficient so far for my needs).

I usually debug with arnoldemu.

Pros: arnoldemu is open-source, has some powerful debugging facilities (several windows, context menu, loading external symbols).
Cons: has become difficult to build (dependency on old wxwidget) and has some annoyances, like consuming 100% CPU whenever the debugger is active, no code history and no release visible since May 13, 2017.

(Most other emulators do not fit because they are not open-source, heavyweight or only work on Windows. https://floooh.github.io/tiny8bit/ is interesting: extremely accurate, easy yet heavyweight build, can run in web pages like https://gourichon.org/cpcitor/bydate/2020/2020-05-03/ .)

CPCEC may replace both

Pros: like caprice32 CPCEC is open-source with public history (I created a git history from your zips to share on github, with proper commit messages and fixing some issues like corrupted rom in one commit), lightweight, easy to build, has menus.
Cons: imperfect fullscreen handling, can not yet be instructed from command line to run some command and exit on next CPC reset. I can contribute as I did for caprice32. Also, debugging is not as luxurious as in arnoldemu. Interestingly, tiny8bit allows to use any window resolution for status and debugging, could provide inspiration.

All in all, congrats for cpcec!
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 08:29, 09 May 20
Hi again!

You did a very good job of isolating the operating-system-dependent parts and making a SDL2 variant.
CPCEC works very well on Linux, and consumes little CPU on my machine!

I guess you will update http://cngsoft.no-ip.org/cpcec.htm

Turning this

Quote
CPCEC requires a Microsoft Windows 2000 operating system or later.

Into something like this?

Quote
CPCEC can run on Windows and SDL2-supported platforms including Linux desktop.
The Windows variant of CPCEC requires a Microsoft Windows 2000 operating system or later.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 11:56, 10 May 20
It's really nice that we start to have choices of emulators.

I love the ability to dump part of the CPC memory to a host file, to check for non-corruption.

Cpce really nicely fits the "simple, accurate, and convenient" type of emulator, which is a perfect niche to run and develop.

By comparison, RetroVirtualMachine complexity of UI makes it less practical to use (especially the debugging features), but on the plus side; its outstanding graphical realism (including rotating cassette reels) and capability to hear the tape signal while the CPC decodes it, are really nice when checking a tape loader being developed really works as intended.

Congrats to all of you, you rock!
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 16:44, 22 May 20
Ah, I found some drawback in CPCEC: sound is mono.  :blank:

So, when checking music and do not need a debugger I use caprice32 again.

From looking at the source code it looks like CPCEC is mono on all platforms.

As expected, setting

Code: [Select]
#define AUDIO_CHANNELS 2

in cpcec-ox.h is not enough to get stereo sound.  ::)

Still, huge congrats to CNGSoft. I used CPCEC debugger a number of times.
Title: Re: CPCEC a new emulator from cngsoft
Post by: XeNoMoRPH on 10:23, 05 June 20
Quote
20200603 -- seventeenth public release. Added stereo sound. Fixed a bug in the CPC PIO (the read-only mode of port A allowed writing), another bug in the tape analysis (CPCEC: the algorithm for TITUS caused trouble in "The Blues Brothers"; ZXSEC: Speedlock5 didn't recognize the heading noise; both systems add patches to shorten the initial delays), another one in the loading of CPC snapshots (a snapshot saved on PLUS hardware without the "CPC+" block showed a completely black palette), another one in the Z80 debugger (the command 'P0 could generate an infinite disassembly), another one on tape handling (reading a WAV file must use >128 as reference instead of >=128) and some problems in Win32 (the screen stopped updating after pausing, switching windows in and out) and SDL2 (boot message errors weren't shown; the filename sorting algorithm was slow).
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 16:06, 11 October 20
It took a long while, but CPCEC 20201010 is out. Big changes in the CRTC logic ("Chapelle Sixteen" runs at last!), new support for Dandanator cartridges (now you can play "Sword of Ianna"), partial Playcity support (enough for Targhan and Toto's teasers to work), more disc protections that run, new debugging functions (looking at graphics, following a timer, skipping scanlines and frames, etc), improvements in the user interface...

(http://cngsoft.no-ip.org/IMAGE_2020-08-13_13-00-39.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-09-06_00-02-12.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-09-10_08-31-37.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-08-16_13-46-41.PNG)
(http://cngsoft.no-ip.org/IMAGE_2020-09-24_18-20-56.PNG) (http://cngsoft.no-ip.org/IMAGE_2020-09-25_13-54-23.PNG)

I need a rest, but I still want to make a game for the CPC Retrodev 2020 compo, so the next three weeks are going to be busy, a race against the deadline...
Title: Re: CPCEC a new emulator from cngsoft
Post by: Targhan on 23:44, 11 October 20
Wow, great job!

Quote
I need a rest, but I still want to make a game for the CPC Retrodev 2020 compo
Great, but think about your health (mental and physical) first. Take care :).
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 18:05, 13 October 20
Small update: CPCEC 20201012 adds mouse support for SDL2. Keyboard usage stays the same, the mouse support is built on top of it:
- the main menu appears when right-clicking on the window;
- navigating menus requires clicking on their captions;
- picking a menu item requires clicking on said item;
- scrolling a list requires clicking above it (or below it) once;
- choosing an item in a list requires clicking on it twice (first click selects it, second click confirms the choice);
- quitting menus and dialogs requires clicking outside their areas.

Closing widgets by clicking beyond their bounds should feel familiar: the user interface from Rainbird Software's "OCP Art Studio".
(http://cngsoft.no-ip.org/IMAGE_2020-10-13_18-14-35.png) (http://cngsoft.no-ip.org/IMAGE_2020-10-13_18-14-55.png)

It was one of the goals for the 20201010 release but it was half cooked and I forgot to finish it beforehand.
Title: Re: CPCEC a new emulator from cngsoft
Post by: reidrac on 21:34, 13 October 20
Would it be possible to include the source files in a directory inside the ZIP and that the filenames are all lowercase?

Is not really a big deal, but every time I uncompress the ZIP, is a bit messy in Linux :)

Thanks for the emulators (both, I use cpcec and zxsec in Linux).
Title: Re: CPCEC a new emulator from cngsoft
Post by: pelrun on 11:15, 14 October 20
I never trust a zip file, I invariably go into a new dir before unpacking them. And there's an option to unzip to lowercase the filenames.
@cpcitor (https://www.cpcwiki.eu/forum/index.php?action=profile;u=531) has been maintaining a git repo at https://github.com/cpcitor/cpcec as well, which has the benefit of the full history of the zipped releases. Although it's not quite been updated with the newest release yet.
Title: Re: CPCEC a new emulator from cngsoft
Post by: reidrac on 11:31, 14 October 20
I never trust a zip file, I invariably go into a new dir before unpacking them. And there's an option to unzip to lowercase the filenames.
@cpcitor (https://www.cpcwiki.eu/forum/index.php?action=profile;u=531) has been maintaining a git repo at https://github.com/cpcitor/cpcec as well, which has the benefit of the full history of the zipped releases. Although it's not quite been updated with the newest release yet.

Hah! Looks like the unzip version of Ubuntu has the lowercase option, but I don't think I saw it in thee Debian version :(

It may be me, just ignore me  :picard:
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 11:54, 14 October 20
I never trust a zip file, I invariably go into a new dir before unpacking them. And there's an option to unzip to lowercase the filenames.
@cpcitor (https://www.cpcwiki.eu/forum/index.php?action=profile;u=531) has been maintaining a git repo at https://github.com/cpcitor/cpcec as well, which has the benefit of the full history of the zipped releases. Although it's not quite been updated with the newest release yet.

Thanks @Pelrun. Indeed, and I'm planning to update the repo today.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 16:14, 14 October 20
@cpcitor (https://www.cpcwiki.eu/forum/index.php?action=profile;u=531) has been maintaining a git repo at https://github.com/cpcitor/cpcec as well, which has the benefit of the full history of the zipped releases. Although it's not quite been updated with the newest release yet.

It is now up-to-date! You can get the benefits of git with:

git clone https://github.com/cpcitor/cpcec


For the record, this is made possible because @cngsoft (https://www.cpcwiki.eu/forum/index.php?action=profile;u=191) does things rather tidy, which makes automation possible:

* the history is generated by a script that fetches the ZIPs from the official cpcec web page and extracts the messages from the changes in file `cpcec-e.txt`.
* from now on each commit message includes the names of the ZIP file that was used to generate the commit, see for example https://github.com/cpcitor/cpcec/commit/01b09339b25784d38e31afbceff2c3c82e6e910f "This commit corresponds to archive: cpcec-20201010.zip"
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 19:31, 17 October 20
new debugging functions (looking at graphics, following a timer, skipping scanlines and frames, etc), improvements in the user interface...

I noticed, when debugging, the vertical dotted line on the emulated screen, which is very cool to "feel" the speed at which the picture is displayed while the Z80 does its best to compute.

I played with the "show graphics" (press W in the debugger). Would need some more explanation.
I'm still puzzled because even on my latest game JustGet9, knowing the address and width in bytes, I could not see my graphics.  ¯\_(ツ)_/¯

I figured out from the source https://github.com/cpcitor/cpcec/blob/master/cpcec-z8.h#L4267 those keys:
HOME/END increase/decrease "sprite width in bytes"?
LEFT/RIGHT move one byte left/right
UP/DOWN move one line up/down
PAGEUP/PAGEDOWN move 16 lines up/down

Title: Re: CPCEC a new emulator from cngsoft
Post by: Spirax on 12:24, 20 October 20
Hello.I just create an account to say thanks to cngsoft for the dandanator support on CPCEC  :o
thanks a lot for make Sword of Ianna playable on another emulator.
I will follow it on futures releases as I am developing a new cardbridge game....For the moment I can only say it works fine after I modify my own code to make it compatible with the emulator  :P As per the dandanator specs, we can use FD+FD + ld (IY+x) , abc ,
A for the config,
B for 1st slot zone
and C for 2nd slot zone

On my code for the new game I map both slots at same time using this code
Code: [Select]
    ld iy, rombank
    defb #fd, #fd
    ld (iy+0), b
    defb #fd, #fd
    ld (iy+1), c
And it was not working properlyAfter a few debug sessions I was able to found that the emulator only manage (iy+0) as tigger and not (iy+1)

so I modify my code to:
Code: [Select]
    ld iy, rombank
    defb #fd, #fd
    ld (iy+0), b
    inc iy
    defb #fd, #fd
    ld (iy+0), c
and now my new game (WIP port to CPC not announced yet) is working as supposed on CPCEC too  8)
but I would like to report it as may be good for a future release for a better dandanator emulation fidelity if you can check to use only 4 bytes as tigger for FDFDFD70 ,FDFDFD71, FDFDFD77 instead of the actual 5 bytes as FDFDFD7000 ,FDFDFD7100, FDFDFD7700

thanks a lot fo all your work
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 00:50, 21 October 20
Hello.I just create an account to say thanks to cngsoft for the dandanator support on CPCEC  :o
thanks a lot for make Sword of Ianna playable on another emulator.
I will follow it on futures releases as I am developing a new cardbridge game....For the moment I can only say it works fine after I modify my own code to make it compatible with the emulator  :P As per the dandanator specs, we can use FD+FD + ld (IY+x) , abc ,
A for the config,
B for 1st slot zone
and C for 2nd slot zone

On my code for the new game I map both slots at same time using this code
Code: [Select]
    ld iy, rombank
    defb #fd, #fd
    ld (iy+0), b
    defb #fd, #fd
    ld (iy+1), c
And it was not working properlyAfter a few debug sessions I was able to found that the emulator only manage (iy+0) as tigger and not (iy+1)

so I modify my code to:
Code: [Select]
    ld iy, rombank
    defb #fd, #fd
    ld (iy+0), b
    inc iy
    defb #fd, #fd
    ld (iy+0), c
and now my new game (WIP port to CPC not announced yet) is working as supposed on CPCEC too  8)
but I would like to report it as may be good for a future release for a better dandanator emulation fidelity if you can check to use only 4 bytes as tigger for FDFDFD70 ,FDFDFD71, FDFDFD77 instead of the actual 5 bytes as FDFDFD7000 ,FDFDFD7100, FDFDFD7700

thanks a lot fo all your work
Excellent bug report, thank you very much! Together with several few changes from the past days, it deserves a new release!

(http://cngsoft.no-ip.org/IMAGE_2020-10-11_18-58-33.png) (http://cngsoft.no-ip.org/IMAGE_2020-10-16_21-35-49.png)
20201020 -- minor patch fixing a bug in the Dandanator support (the "LD (IY+n),A/B/C" operations must work with any "n" value, instead of just 0: thanks to Spirax for the report) and another one in the CRTC (counter HCC is 8 bits long: "Camembert Meeting 4 Demo" stops showing a line of garbage between the top and the middle panels), adding SDL2_DOUBLE_QUEUE as an optional SDL2 compilation flag (some systems need an audio buffer longer than the default 8 frames) and using a different pixel pattern when both X-Masking and Y-Masking are enabled.

I cannot wait to know more about your ongoing Dandanator-based project, and I hope that this new version will be fully compatible with it.
Title: Re: CPCEC a new emulator from cngsoft
Post by: cpcitor on 01:24, 21 October 20
Excellent bug report, thank you very much! Together with several few changes from the past days, it deserves a new release!


20201020 -- minor patch fixing a bug in the Dandanator support (the "LD (IY+n),A/B/C" operations must work with any "n" value, instead of just 0: thanks to Spirax for the report) and another one in the CRTC (counter HCC is 8 bits long: "Camembert Meeting 4 Demo" stops showing a line of garbage between the top and the middle panels), adding SDL2_DOUBLE_QUEUE as an optional SDL2 compilation flag (some systems need an audio buffer longer than the default 8 frames) and using a different pixel pattern when both X-Masking and Y-Masking are enabled.

Hi!

Congrats cngqsoft for the new release!

For the people who prefer to get code and updates via git, I updated the repo on https://github.com/cpcitor/cpcec with the new release.

To get code first time:

Code: [Select]
git clone https://github.com/cpcitor/cpcec
To update:

Code: [Select]
git fetch ; git rebase
Title: Re: CPCEC a new emulator from cngsoft
Post by: Spirax on 17:54, 21 October 20
Hello.
Thanks for the new vesrion, I have reverted my code to use ld (iy+1) as I save 4 bytes and some cicles on the routine. I have tested the new version and now is working properly with ld (iy+1), thanks

if I can sugest something for the TODO list.....
whe we released Sword Of Ianna a lot of user requested the posiblity to use snapshots for cardbridges as no any emulator support it.

I have done some test and appear as I can save a snap when I am running a dandanator cardbridge.
BUT in order to load it, you need to follow some procedure....
start the emulator
load the same dandanator cardbridge and start it
then load the snap.sna and on 95% of the cases you recover the game :;)

there is any posibility to link the snapshot saved to the cardbridge that was loaded when the snapshot was created?

please add this to a future future TODO list, I think someone will need to create a standard snapshot file for cardbridges or a new version of sna with cardbirdge options :)

on Ianna we only save on the Dandanator cardbridge the preferences, as user can redefine keys and the language selected, so on original CPC we can recover user preferences from dandanator.
on the new game I am looking to implement a quick status save, that will alow the user to save like a check point on the cardbridge on any moment on the game.
it will have passwords to access the different levels, but user can on any moment save the state or reload the previous saved status :)

After check the code with CPCEC I have added some protections to the routine to check if it was saved to the cardhbridge properly.
so if on real CPC it will report savestatus "Ok", and under emulators than don't support save (yet) it will report savestatus "Fail"
 8)
so thanks again for the emulator than allow us to test our code better  ;)

Saludos
Spirax
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 20:37, 21 October 20
Hello.
Thanks for the new vesrion, I have reverted my code to use ld (iy+1) as I save 4 bytes and some cicles on the routine. I have tested the new version and now is working properly with ld (iy+1), thanks

if I can sugest something for the TODO list.....
whe we released Sword Of Ianna a lot of user requested the posiblity to use snapshots for cardbridges as no any emulator support it.

I have done some test and appear as I can save a snap when I am running a dandanator cardbridge.
BUT in order to load it, you need to follow some procedure....
start the emulator
load the same dandanator cardbridge and start it
then load the snap.sna and on 95% of the cases you recover the game : ;)

there is any posibility to link the snapshot saved to the cardbridge that was loaded when the snapshot was created?

please add this to a future future TODO list, I think someone will need to create a standard snapshot file for cardbridges or a new version of sna with cardbirdge options :)

on Ianna we only save on the Dandanator cardbridge the preferences, as user can redefine keys and the language selected, so on original CPC we can recover user preferences from dandanator.
on the new game I am looking to implement a quick status save, that will alow the user to save like a check point on the cardbridge on any moment on the game.
it will have passwords to access the different levels, but user can on any moment save the state or reload the previous saved status :)

After check the code with CPCEC I have added some protections to the routine to check if it was saved to the cardhbridge properly.
so if on real CPC it will report savestatus "Ok", and under emulators than don't support save (yet) it will report savestatus "Fail"
 8)
so thanks again for the emulator than allow us to test our code better  ;)

Saludos
Spirax
What you say touches two topics. On one hand, CPCEC does use a small custom block for Dandanator status at the end of each snapshot, a small 16-byte chunk labelled "DNTR" that includes the last four bytes sent to the configuration ports, plus the last four bytes that are currently in use: the "RET mode" delays the activation of the new configuration bytes, so we need to keep the old ones somewhere. However, as you say, the user still needs to insert the appropriate Dandanator cartridge before loading the snapshot. If no cartridge is present, CPCEC automatically inserts the last known Dandanator cartridge; it isn't a great guess, but it let me play "Sword of Ianna" during several days on two machines (a desktop and a laptop) until I completed it. I'm wary of including paths and filenames within this custom block because nothing keeps the user from moving or renaming cartridges and snapshots, and thus making the included paths and filenames useless.

On the other hand, the Dandanator being able to save data on its own cartridges (Flash EEPROM, isn't it?) is a topic that the official documentation explains poorly and that, for fear of destroying data, I didn't implement; I'll wait for more explicit docs on the matter. The even poorer documentation on Spectrum (right now, all I know is that the ZX Dandanator monitors writes to the lowest 16k page; I have no idea on what those writes mean and do) is the reason why ZXSEC lacks Dandanator support, too.

So as you can see things are still limited and the CPC Dandanator support is restricted to read-only operation, not unlike the Playcity emulation that merely emulates plays and triggers NMIs because they're the only parts I could read about and test.
Title: Re: CPCEC a new emulator from cngsoft - unable to save files to disc
Post by: Nich on 22:14, 21 October 20
Is it just me, or has anyone else found a major problem with CPCEC, in that it doesn't save files to disc images?

To test this, reset the CPC, insert a DSK file into drive A, and type in a line in BASIC such as:

Code: [Select]
10 PRINT"Hello world"
Then save it to disc:

Code: [Select]
SAVE"hello"
No error messages like "disc is write protected" appear, and the status display at the bottom left of the screen flashes to indicate that there is disc drive activity.

Now try cataloguing the disc:

Code: [Select]
CAT
In my case, even though there were no error messages, the file has not been saved to the disc image!

 [ You are not allowed to view attachments ]

I've tested it in both Windows and Linux (under Wine) and this bug occurs in the latest version (20201012) and several previous releases.
Title: Re: CPCEC a new emulator from cngsoft - unable to save files to disc
Post by: cpcitor on 22:22, 21 October 20
Is it just me, or has anyone else found a major problem with CPCEC, in that it doesn't save files to disc images?

I've observed this, too, and can reproduce with release 20201012.

Actually, when you press F7 to insert a disk, you can press TAB to show another menu with options "Read Only" and "Read/Write".

If you choose "Read/Write" (it is tricky to know which you actually choose), then you get the expected behavior.

That said, you're right. The default behavior (running cpcec diskimagefilename.dfk) is buggy (no write but no error), the UI is non-discoverable. CPCEC is work in progress, open source and you can contribute. :-)
Title: Re: CPCEC a new emulator from cngsoft
Post by: Dandare on 23:17, 21 October 20
On the other hand, the Dandanator being able to save data on its own cartridges (Flash EEPROM, isn't it?) is a topic that the official documentation explains poorly and that, for fear of destroying data, I didn't implement; I'll wait for more explicit docs on the matter. The even poorer documentation on Spectrum (right now, all I know is that the ZX Dandanator monitors writes to the lowest 16k page; I have no idea on what those writes mean and do) is the reason why ZXSEC lacks Dandanator support, too.

Hi, Thanks for supporting the CPC Dandanator in your emulator.
CPC Dandanator documentation includes the Z80 assembler code for erasing a block and writing a block in flash memory. Further documentation on the expected commands can be found on the SST39SF040 datasheet, since the code simply follows the JEDEC commands as defined there. A quick preview of the code:


Code: [Select]
; ---------------------------------------------------------------------------------------- 
; CPC Dandanator! Mini HW v1.2/1.3 - Eeprom Write SST39SF040
;
; Typical Usage ->    LD A, SectN               ; Loop 128 sectors
;               CALL SSTSECTERASE         ;   |
;               LD A, SectN               ;   |
;               LD HL, RAMSOURCE4KBLOCK      ;   |
;               CALL SSTSECTPROG         ;   |
;               JP DDNTRRESET
;
; Dandare - May 2018
; ----------------------------------------------------------------------------------------     


; ----------------------------------------------------------------------------------------
; ERASE SECTOR
;     A  = Sector number (39SF040 has 128 4k sectors)
;
;    ****  MUST BE RUN FROM RAM, DI, AND WITH EXTERNAL EEPROM (ZONE0) PAGED IN in 0x0000
;   ****  NO OTHER ZONE PAGED IN, Commands Enabled
;   ****  Also Write Operations must be enabled and serial operations disabled
;
; ----------------------------------------------------------------------------------------
SSTSECERASE:PUSH AF                  ; Save Sector Number
         AND 3                  ; Get Sector within Page
         SLA A                  ; Move to A13,A12 in DE
.....


On the other hand, there is a specific ZX Dandanator document for emulator implementation that I wrote back in 2016 (Last updated in 2018) that I have distributed to anyone interested in supporting ZX Dandanator in his/her emulator.  This document explains pulse timings, commands types, and technical details on the implementation, focusing on the most relevant aspects to include in an emulator. I'll be happy to share it with you if you are interested.


A sample of this document (In Spanish) is shown below:


Code: [Select]
El ZX Dandanator! Mini recibe comandos de control a través de escrituras en el espacio ROM (0x0000-0x3FFF).
Sin embargo, por compatibilidad futura y soporte de ZesarUX, se le asignan las direcciones comprendidas entre 0x0000 y 0x0003.
 
Estos comandos, que pueden ser simples o múltiples/especiales (más detalle sobre esto luego)
están compuestos una serie de pulsos consecutivos generados por esas escrituras (ld (0x0001),a -  por ejemplo.
El valor de A es ignorado aunque se usa en el emulador ZesarUX).
El HW del Dandanator espera recibir pulsos separados por, al menos 7us y nunca más de 32us,
aunque se recomienda una separación nominal de entre 10 y 15us.
Para determinar el valor del comando enviado, el microcontrolador arranca un timer de 32us en el momento
de recibir cada pulso y, si recibe otro pulso antes de que el timer se complete, va sumando ese pulso a un contador.
Cuando se produce un “timeout”, es decir, cuando pasan 32us sin recibir otro pulso, se consideran los pulsos
contados como el comando recibido. En la imagen siguiente, el comando es “20”. (captura de analizador lógico)
...
Los comandos especiales están conformados por 3 comandos simples consecutivos más un pulso de confirmación.
Deben atender a unos criterios de temporización y direccionamiento estrictos de la siguiente manera:
 
·      Cada comando recibido está sujeto a las mismas normas explicadas con anterioridad sobre la distancia entre pulsos y el timeout.
·      De manera adicional, desde el momento de detección de cada comando (tras su timeout) se dispone de un máximo de 512us
para enviar el siguiente dato del comando especial. Si no se hace, se ignora el comando recibido.
 
·      Por compatibilidad con ZesarUX, el primer byte del comando debe enviarse a la dirección 0x0001,
el segundo a la dirección 0x0002, el tercero a la dirección 0x0003 y el pulso de confirmación,
con cualquier valor en el dato, a la dirección 0x0000.


....




Additionally, the full source code for the PIC microcontroller in the ZX Dandanator is available at the project's homepage, including the "commands.h" file describing all possible received commands.


An excerpt of this commands.h file:
Code: [Select]

// Special Command code to execute (all special commands are 4-steps: Command Code, Command Data 1, Command Data 2, Fast Execute)
// Command Code, Data 1 and Data 2
// Data1, Data2 and Fast Execute MUST be on next consecutive 512us windows to Command (4 windows total). Otherwise Special Command will be ignored
// All data must arrive in pulses separated by at least 8us and no more than 30us.
// Detecting a command is done by timing out the pulses. After 32us without a pulse, the command, consisting in the number of received pulses, is processed.


// COMMANDS :
//---------------------------------------------------------------------------------------
// Command 0    : Not implemented (can't be)
// Command 1-32 : Bank Switch to 0-31 (1-32 pulses)
// Command 33   : Bank Switch to Internal ROM (Internal is recognized as Bank 33)
#define CMD_INTERNALROM_DISABLECMD 34
// Command 34   : Bank Switch to Internal ROM & Disable further Commands
// Command 35   : Reserved
#define CMD_RESET 36
// Command 36   : Generate a Reset
#define CMD_NMI 37
// Command 37   : Generate a NMI
// Command 38   : Reserved
#define CMD_SET_RESETSLOT 39
// Command 39   : Set Reset Slot. Current Slot is selected in case of an Spectrum-Triggered Reset. Cleared on ANY reset (even PIC-Triggered resets).
//--------------------------------------------------------------
#define CMD_SP_FASTCHANGE 40
// Special Command 40   : Fast Change & Action
//                      : Data 1 : Bank Number (1-33,35) - 35 means previous bank   
//                      : Data 2 : Action to perform
//                               : bit 3 - Disable Commands
//                               : bit 2 - Lock Commands   
//                               : bit 1 - NMI
//                               : bit 0 - Reset
//                               : bits 4-7 - Reserved MUST be 0
//--------------------------------------------------------------
Title: Re: CPCEC a new emulator from cngsoft - unable to save files to disc
Post by: cngsoft on 00:18, 22 October 20
Is it just me, or has anyone else found a major problem with CPCEC, in that it doesn't save files to disc images?
To test this, reset the CPC, insert a DSK file into drive A, and type in a line in BASIC such as:
Code: [Select]
10 PRINT"Hello world"Then save it to disc:
Code: [Select]
SAVE"hello"No error messages like "disc is write protected" appear, and the status display at the bottom left of the screen flashes to indicate that there is disc drive activity.
Now try cataloguing the disc:
Code: [Select]
CATIn my case, even though there were no error messages, the file has not been saved to the disc image!

I've tested it in both Windows and Linux (under Wine) and this bug occurs in the latest version (20201012) and several previous releases.
I believed I had already answered this question to you in a past email, but I see that I never did. Ah well: CPCEC discards writes by default unless you ask CPCEC to create a disc from the menu, or you insert the disc with F7 (drive A) or Shift-F7 (drive B) and -depending on the Windows version- you disable the "read only" checkbox or you choose "open for writing" on the Open button submenu. Microsoft hid the file dialog options inside the "Open" button after Windows XP, but Wine's implementation keeps the options visible:

(http://cngsoft.no-ip.org/PANTALLAZO-2020-10-21_23-19-50.png)

The SDL version, as @cpcitor (https://www.cpcwiki.eu/forum/index.php?action=profile;u=531) states, provides these options through an extra menu that pops up when hitting TAB.

That being said, I should really consider dividing this dual behavior into three parts:
1.- explicit read-only, writing isn't allowed and triggers Write Protected errors;
2.- implicit read-only, writing isn't allowed but triggers nothing;
3.- explicit read-write, writing is allowed.
Cases 1 and 3 fit regular activity, while case 2 is ideal for protected discs that need the write protection off. I even spoke about it here in this same thread.
Title: Re: CPCEC a new emulator from cngsoft
Post by: tjohnson on 01:10, 22 October 20
I have a usb pad type controller, is it possible to use it on this emulator?
Title: Re: CPCEC a new emulator from cngsoft
Post by: Skunkfish on 17:43, 22 October 20
I just hooked up a gamepad to test and it seemed fine (two of the 6 buttons got recognised as X & Z), although there's nothing really in the way of settings.
Title: Re: CPCEC a new emulator from cngsoft
Post by: tjohnson on 19:21, 22 October 20
@Skunkfish (https://www.cpcwiki.eu/forum/index.php?action=profile;u=348) did you have to configure anything in the emulator to make the pad work?
Title: Re: CPCEC a new emulator from cngsoft
Post by: Skunkfish on 23:56, 22 October 20
Nope, just plug and play...
Title: Re: CPCEC a new emulator from cngsoft
Post by: cngsoft on 02:08, 23 October 20
Following the previous talk about disc write protections, and after noticing that the recently added mouse support for SDL2 lacked wheel scrolling, I made a new minor release:

20201022 -- minor patch adding mouse wheel support to the SDL2 user interface and an option to set whether disc write conflicts in CPCEC and ZXSEC are strict (they raise errors) or relaxed (they do nothing).

The choice of disc write error mode is saved in the configuration file and sticks between sessions. By the way, and since we're speaking about things that the user can see (or cannot), Norecess' recent (and spectacular!) experiments with CPCEC's interfaces (both user and debugger) are making me ponder the convenience of further separating machine emulation and user interaction for the sake of "hackability" and extensibility.

@tjohnson (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2129) : the joystick configuration is up to the operating system, I merely ask either the Windows API or the SDL2 library to tell me which joysticks are available and I choose the first one that is active.

EDIT: extremely small update 20201024 -- minor patch solving a problem in the SDL_WINDOWEVENT_EXPOSED event, inverting the black/white bits in ZXSEC's graphics viewer and pointing CPCEC's viewer at RAM rather than ROM.