Author Topic: CPCEC a new emulator from cngsoft  (Read 28836 times)

0 Members and 1 Guest are viewing this topic.

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.514
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 1108
  • Likes Given: 606
Re: CPCEC a new emulator from cngsoft
« Reply #125 on: 19:16, 04 January 21 »
I made a provisional version based on the code supplied by Pelrun: http://cngsoft.no-ip.org/cpcec-20210103-2555.zip
I don't have any joysticks at home and right now I must head out, so please test it and tell me whether the new joystick code behaves as intended.
If everything goes well, I'll properly update the docs and make this version fully public. If not, I'll continue editing the code until both angular and axial joysticks work.
heya, i tested it and it's not detecting any input from my controller.  I checked again on the previous version to make sure that one still does and yeah the previous one still detects buttons and has the movement attached to analog but this new one I'm getting nothing from. Sorry. :/
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline cngsoft

  • CPC6128
  • ****
  • Posts: 173
  • Country: es
  • Liked: 745
  • Likes Given: 362
Re: CPCEC a new emulator from cngsoft
« Reply #126 on: 01:17, 05 January 21 »
heya, i tested it and it's not detecting any input from my controller.  I checked again on the previous version to make sure that one still does and yeah the previous one still detects buttons and has the movement attached to analog but this new one I'm getting nothing from. Sorry. :/
Second try: http://cngsoft.no-ip.org/CPCEC-20210104-2335.ZIP
Made after noticing three points: 1.- Win32 joyGetPosEx requires the dwSize and dwFlags fields of JOYINFOEX to be properly filled in advance, 2.- Win32 JOYINFOEX.dwPOV field is not -1 when the controller is a joystick, but 65535; 3.- the SDL2 SDL_GameController operation set must coexist with the SDL_Joystick set; the former does NOT include the later, the function SDL_IsGameController tells which operation set must be used.
« Last Edit: 11:06, 05 January 21 by cngsoft »
(if you can't see the banner right now my server is currently offline)

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.514
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 1108
  • Likes Given: 606
Re: CPCEC a new emulator from cngsoft
« Reply #127 on: 11:39, 05 January 21 »
Second try: http://cngsoft.no-ip.org/CPCEC-20210104-2335.ZIP
Made after noticing three points: 1.- Win32 joyGetPosEx requires the dwSize and dwFlags fields of JOYINFOEX to be properly filled in advance, 2.- Win32 JOYINFOEX.dwPOV field is not -1 when the controller is a joystick, but 65535; 3.- the SDL2 SDL_GameController operation set must coexist with the SDL_Joystick set; the former does NOT include the later, the function SDL_IsGameController tells which operation set must be used.
D-pad working fine now. Thanks! :)
My only other request would be to choose which buttons on the controller is Fire 1 and Fire 2 (and allow for some keys to be mapped to controller for games that require it like those that use Space or Return for smart bombs or menus or P/H keys for pausing) but don't worry about that.  Just having the more precise control of controlling CPC games correctly with the d-pad instead of the analog stick is a huge improvement and I can properly play games on it. :)
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline cngsoft

  • CPC6128
  • ****
  • Posts: 173
  • Country: es
  • Liked: 745
  • Likes Given: 362
Re: CPCEC a new emulator from cngsoft
« Reply #128 on: 20:09, 05 January 21 »
D-pad working fine now. Thanks! :)
My only other request would be to choose which buttons on the controller is Fire 1 and Fire 2 (and allow for some keys to be mapped to controller for games that require it like those that use Space or Return for smart bombs or menus or P/H keys for pausing) but don't worry about that.  Just having the more precise control of controlling CPC games correctly with the d-pad instead of the analog stick is a huge improvement and I can properly play games on it. :)
Excellent, it works at last! I just made a couple more edits (accepting more joystick buttons as virtual mirrors) and published the resulting package:

20210105 -- minor patch fixing a bug in video recording (it turned 44KHz stereo into 88KHz mono) and tape playback (16 and 24 bit WAVE files were improperly supported), extending the joystick support to handle directional controls (thanks to Pelrun for the Win32 and SDL2 code) and letting the Dandanator emulation modify the cartridge (configuration, savestates...) if the user requests it.

I'll have to think of a way to give the user the ability to redefine the keyboard and joystick mappings altogether, although I cannot easily imagine it working on Win32 and SDL2 at the same time. Perhaps in the next major release...
(if you can't see the banner right now my server is currently offline)

Offline tjohnson

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.001
  • Country: gb
    • index.php?action=treasury
  • Liked: 319
  • Likes Given: 289
Re: CPCEC a new emulator from cngsoft
« Reply #129 on: 02:38, 06 January 21 »
This latest version has broken my gamepad, now seems to be show up arrow constantly pressed on the pad.  Checked with previous version and that works fine.

Offline cngsoft

  • CPC6128
  • ****
  • Posts: 173
  • Country: es
  • Liked: 745
  • Likes Given: 362
Re: CPCEC a new emulator from cngsoft
« Reply #130 on: 23:35, 07 January 21 »
This latest version has broken my gamepad, now seems to be show up arrow constantly pressed on the pad.  Checked with previous version and that works fine.
After buying a game controller for 10 EUR I edited the code until it behaved as intended. Interestingly, the order of buttons in SDL2 is different from Win32, despite the controller being the same. Arthur also spotted a couple of things that needed fixing and helped me get them right.

- 20210107 -- minor patch fixing a bug in the ASIC's screen split trigger (SSSL must be checked when HSYNC rises, rather than when HDISP rises) and a glitch in the Win32 joystick support, and making the Playcity CTC more responsive.

That being said, configuring the joystick within the OS stays important; my own new controller can work in digital and analog modes, and things fared differently on each mode; changing modes while CPCEC was on led to undesired effects (i.e. going crazy)
« Last Edit: 15:06, 11 January 21 by cngsoft »
(if you can't see the banner right now my server is currently offline)

Offline cngsoft

  • CPC6128
  • ****
  • Posts: 173
  • Country: es
  • Liked: 745
  • Likes Given: 362
Re: CPCEC a new emulator from cngsoft
« Reply #131 on: 16:39, 15 January 21 »
New update, made possible by a bug report from Xenomorph, and featuring several tweaks:
- 20210114 -- minor patch improving Playcity stereo autodetection ("Alcon 2020" uses the left chip only), adding ROM simulation to Dandanator cartridges ("CPC Soccer") and fixing a bug in Z80 instruction CPI introduced in version 20210105 (RAXOFT tests) and another one in the CRTC1 VSYNC length ("Pheelone").
(if you can't see the banner right now my server is currently offline)

Offline cpcitor

  • The user previously known as FindYWay
  • 464 Plus
  • *****
  • Posts: 324
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 164
  • Likes Given: 425
Re: CPCEC a new emulator from cngsoft
« Reply #132 on: 17:19, 15 January 21 »
New update, made possible by a bug report from Xenomorph, and featuring several tweaks:
- 20210114 -- minor patch improving Playcity stereo autodetection ("Alcon 2020" uses the left chip only), adding ROM simulation to Dandanator cartridges ("CPC Soccer") and fixing a bug in Z80 instruction CPI introduced in version 20210105 (RAXOFT tests) and another one in the CRTC1 VSYNC length ("Pheelone").

As usual, all those update are propagated on https://github.com/cpcitor/cpcec . (I have written a script, it's just a matter of running it.)

Congratulations cngsoft!

Strangely enough, about a month ago I had a bug where the CPC screen would refresh only about once a second (version was up to date at the time, SDL2 on Xubuntu 20.04). Tested several versions recently, not reproduced anyway. ¯\_(ツ)_/¯
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

Offline cngsoft

  • CPC6128
  • ****
  • Posts: 173
  • Country: es
  • Liked: 745
  • Likes Given: 362
Re: CPCEC a new emulator from cngsoft
« Reply #133 on: 11:40, 16 January 21 »
Extremely quick fix: "20210115 -- minor patch fixing a bug in the CPC PIO: "Inertie" sends a value to port A, then reads the same value back instead of receiving a PSG register or keyboard bits." Thanks to Dlfrsilver for spotting the glitch.
(if you can't see the banner right now my server is currently offline)

Offline cngsoft

  • CPC6128
  • ****
  • Posts: 173
  • Country: es
  • Liked: 745
  • Likes Given: 362
Re: CPCEC a new emulator from cngsoft
« Reply #134 on: 10:21, 28 January 21 »
Two updates:


 
CPCEC 20210127 -- minor patch fixing bugs in the Spectrum timing ("LD (IX+n1),n2" and Z80_PRAE_SEND: thanks to Azesmbog for the FPGA test report) and the CPC tape analysis (conflict between Mikrogen and Hi-Tec).
CHIPNSFX 20210127 -- 32nd public release. Major rewrite: CHIPNSFX can be compiled with SDL2 ("gcc -O2 -DSDL2 -xc chipnsfx.c -lSDL2 -ochipnsfx") in other platforms than Windows. Added HEROBOTX.CHP, HISTEEL3.CHP, IKPLUS.CHP and TWINTUV8.CHP.
« Last Edit: 15:58, 28 January 21 by cngsoft »
(if you can't see the banner right now my server is currently offline)

Offline cpcitor

  • The user previously known as FindYWay
  • 464 Plus
  • *****
  • Posts: 324
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 164
  • Likes Given: 425
Re: CPCEC a new emulator from cngsoft
« Reply #135 on: 23:23, 31 March 21 »
Thanks @cngsoft for several updates again, published in :
cpcec-20210219.zip
cpcec-20210129.zip
cpcec-20210127.zip
cpcec-20210115.zip

Latest changelog from @cngsoft says:

    minor patch adding a new option, "Video: Blend scanlines" that handles
    Gigascreen effects (Spectrum demos "Mescaline Synesthesia" and
    "Tiratok", CPC demos "Batman Forever" and "Mad Leprechaun") and
    changing the sound synchronisation in SDL2. The AY chip noise generator
    is now a LFSR. SNA files saved from Spectrum Plus3 set bit 4 of byte
    0x0C01E to state that the snapshot requires a Plus3 (Easter egg "Hello
    There I'm a +3"). The CPC debugger adds an information panel (key 'X')
    for Dandanator status, and its graphics viewer can show MODE 2 images.


https://github.com/cpcitor/cpcec is updated again with comprehensive history.

Congrats @cngsoft for the impressive work!
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

Offline SerErris

  • CPC464
  • **
  • Posts: 4
  • Country: de
  • Liked: 1
  • Likes Given: 0
Re: CPCEC a new emulator from cngsoft
« Reply #136 on: 03:07, 18 April 21 »
Anyone has an idea what happend to the cpcec website? Looks like it is down - not answering.

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.396
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1085
  • Likes Given: 2629
Re: CPCEC a new emulator from cngsoft
« Reply #137 on: 12:35, 18 April 21 »
I've told @cngsoft about it, it will be up again soon, I'm pretty sure.

Offline cngsoft

  • CPC6128
  • ****
  • Posts: 173
  • Country: es
  • Liked: 745
  • Likes Given: 362
Re: CPCEC a new emulator from cngsoft
« Reply #138 on: 22:47, 18 April 21 »
Good evening. The server needs some rest every once in a while, so it was off during the past night.

Just in time for an update, after several busy and difficult months: - 20210418 -- twentieth public release. Pixel and scanline filters are now saturation-based (colour aberration, desaturation) rather than luminosity-based (horizontal blur, shading). Fixed bug in XRF-to-AVI recording: VFW32 operations always assumed 16-bit stereo. The film recording options "High resolution" and "High framerate" now stick between sessions, and the first one also applies to BMP screenshots. Aded support for block types $19 and $4B in CDT/TZX tape files, as well as the new disc option "Read-only as default" so the user can choose whether discs are by default read-only or read-write, and this option stacks together with the already extant "Strict disc writes". Added new option "Flip joystick buttons" to CPCEC so users can swap the value of the two CPC joystick buttons, as suggested by SB1903. PSG emulation now catches overflows, regardless of whether they're programming errors (music distortion in "Thing on a Spring") or done on purpose (pipe sound effect in "Thing Bounces Back"). Fixed bug in ZXSEC's Plus3 memory contention ("Firefly" disc release) and improved the beeper (oversampling: Utz's "Quattropic"). ZXSEC snapshot handling is now more strict or flexible (changing models as often or as seldom as possible) depending on the option "Strict SNA files".



 
CHIPNSFX also got an update, although a small one: - 20210418 -- minor patch fixing a bug in the WaveOut timer and a glitch when testing instruments: sound must play even if channels are disabled. Pressing Control-U on the instrument panel removes unused instruments. Added M_U_L_F-G_.CHP, OUTWORLD.CHP, PULSOIDS.CHP and PULSOIDZ.CHP.
« Last Edit: 23:53, 18 April 21 by cngsoft »
(if you can't see the banner right now my server is currently offline)

Offline cpcitor

  • The user previously known as FindYWay
  • 464 Plus
  • *****
  • Posts: 324
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 164
  • Likes Given: 425
Re: CPCEC a new emulator from cngsoft
« Reply #139 on: 23:14, 18 April 21 »
Just in time for an update, after several busy and difficult months: - 20210418 -- twentieth public release. Pixel and scanline filters are now saturation-based (colour aberration, desaturation) rather than luminosity-based (horizontal blur, shading). Fixed bug in XRF-to-AVI recording: VFW32 operations always assumed 16-bit stereo. The film recording options "High resolution" and "High framerate" now stick between sessions, and the first one also applies to BMP screenshots. Aded support for block types $19 and $4B in CDT/TZX tape files, as well as the new disc option "Read-only as default" so the user can choose whether discs are by default read-only or read-write, and this option stacks together with the already extant "Strict disc writes". Added new option "Flip joystick buttons" to CPCEC so users can swap the value of the two CPC joystick buttons, as suggested by SB1903. PSG emulation now catches overflows, regardless of whether they're programming errors (music distortion in "Thing on a Spring") or done on purpose (pipe sound effect in "Thing Bounces Back"). Fixed bug in ZXSEC's Plus3 memory contention ("Firefly" disc release) and improved the beeper (oversampling: Utz's "Quattropic"). ZXSEC snapshot handling is now more strict or flexible (changing models as often or as seldom as possible) depending on the option "Strict SNA files".

I'm always impressed by the level of precision cpcec appears to reach.

Anyway, latest release is now reflected on https://github.com/cpcitor/cpcec .
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

Offline cpcitor

  • The user previously known as FindYWay
  • 464 Plus
  • *****
  • Posts: 324
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 164
  • Likes Given: 425
Re: CPCEC a new emulator from cngsoft
« Reply #140 on: 12:54, 08 May 21 »
I'm always impressed by the level of precision cpcec appears to reach.

Anyway, latest release is now reflected on https://github.com/cpcitor/cpcec .

Propagated this update from http://cngsoft.no-ip.org/cpcec.htm

Quote
20210428 -- minor patch fixing bugs in the firmware INI handler (spaces must be trimmed on both sides of each string) and in several tape fastloaders, and adding inverse video 8-bit characters to the debugger's memory dump.

Updated repo is as always on https://github.com/cpcitor/cpcec .
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.