News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Arnaud

CPCEC a new emulator from cngsoft

Started by Arnaud, 08:14, 16 March 19

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

cpcitor

Quote from: cngsoft on 23:44, 09 January 22
Thanks for the update :-) The demo is "Possible", https://www.pouet.net/prod.php?which=90547 ; the screenshot combines almost all the video filters (pxiels, scanlines, interlace, blending) in ZXSEC.

Thanks. And that one?

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.

cngsoft

Quote from: cpcitor on 23:56, 09 January 22Thanks. And that one?

This one is interlaced. No pixel blur, no frame blending, no scanlines. In hindsight it was a bad choice, scrollers suffer the most with interlace.
(if you can't see the banner right now my server is currently offline)

cpcitor

Quote from: cngsoft on 00:27, 10 January 22
This one is interlaced. No pixel blur, no frame blending, no scanlines. In hindsight it was a bad choice, scrollers suffer the most with interlace.

What is the name of that prod? I'd like to run it on a real CPC one day.
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.

cngsoft

Quote from: cpcitor on 08:20, 10 January 22What is the name of that prod? I'd like to run it on a real CPC one day.
It's Chany & Grees' cracktro of "Popeye 3", https://www.cpc-power.com/index.php?page=detail&onglet=dumps&num=1666 ; the cracktro relies on a CRTC1 quirk (changing R5 then C4 is zero but R4 is nonzero) to move the "Nul Part System" logo on top of the screen.
(if you can't see the banner right now my server is currently offline)

cpcitor

#229
Quote from: cngsoft on 12:10, 10 January 22
It's Chany & Grees' cracktro of "Popeye 3", https://www.cpc-power.com/index.php?page=detail&onglet=dumps&num=1666 ; the cracktro relies on a CRTC1 quirk (changing R5 then C4 is zero but R4 is nonzero) to move the "Nul Part System" logo on top of the screen.

Thanks!

Running it with latest cpcec on Linux, it works but is not interlaced, see attached picture. Why not the same result as yours?

[attach=1,msg210886]
[attach=2,msg210886]
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.

cngsoft

#230
Quote from: cpcitor on 21:03, 10 January 22Thanks!

Running it with latest cpcec on Linux, it works but is not interlaced, see attached picture. Why not the same result as yours?
Interlacing is just a video option of CPCEC, not an actual trait of the CPC hardware; I often enable it on my laptop because it saves CPU time as the emulator doesn't have to perform any scanline duplication. However, some CPC demos rely on software interlacing, for example "Mad Leprechaun", https://www.cpc-power.com/index.php?page=detail&num=12533 : the screen "shakes" with all scanline options disabled, but can become stable with the right options.




CPCEC shows either the right or the wrong interlace (it depends on the timing; switch back to "all scanlines", then back to an interlaced mode if you get the wrong picture) with simple or double interlace enabled, and shows a compromise between both if you enable blending. Something similar happens to the Batman-Spawn screen in the demo "Batman Forever", as well as in many Spectrum demos where the rapid flipping of the two VRAM pages in 128K mode is called "Gigascreen", for example the title screen of "Mescaline Synesthesia".

(if you can't see the banner right now my server is currently offline)

cngsoft

#231
The forum got upgraded; so did my emulators meanwhile.



20220303 -- twenty-second public release. Major internal changes in the debugger: most of it is now part of the general library, only the Z80-specific features stay in the Z80 module. Toggling the debugger's illegal opcode behavior is now done with the key "," (comma); its old key "Q" now runs until the next interruption. The debugger styles (keys "V" and "Shift+V") now include a translucent mode where the emulated screen is visible through the debugger text. Minor optimisations in the video renderer (merge vertical position and frameskip tests), the AY chip (fewer calculations) and the Z80 emulation (reduced banking in operations that read and write the same address). Small tweaks in CPCEC ("Octopus Pocus" for CRTC0 works well at last), ZXSEC (SZX snapshots are now the default choice, SNA format is now secondary), the FDC ("READ ID" must fail when using the wrong density: noticed by Roudoudou), the audio extensions (now Playcity and Digiblaster can be enabled at once, as well as Turbosound and Covox $FB) and the video filters (weakening image contrast rather than saturation).
(if you can't see the banner right now my server is currently offline)

McArti0

Excelent bind mode for CPC Plus. Thank You so much.  :-*

ps. Sorry where is COPY key?
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

cngsoft

Quote from: McArti0 on 00:31, 06 March 22Excelent bind mode for CPC Plus. Thank You so much.  :-*

ps. Sorry where is COPY key?
You're welcome. The CPC's COPY key is now INSERT. Similarly, CLEAR is the modern DELETE.
(if you can't see the banner right now my server is currently offline)

cngsoft

Small update, after noticing bad colours in the half scanlines and the unability to watch the graphics of Plus cartridges and Dandanator cards:

20220307 -- minor patch fixing a bug in the "half scanlines" mode and several omissions in the debuggers.
(if you can't see the banner right now my server is currently offline)

CraigsBar

Loving this emulator. It certainly has replaced WinAPE for me on my windows machines. However I'd Love GUI options to select the "Standard" 16 Rom slots. So that Protext/Maxam etc.. and ParaDOS 1.2 and 1.2+ can be used for the CPC and Plus machines accordingly and swapped out when not needed. 
IRC:  #Retro4All on Freenode

cngsoft

#236
Fixing the OUT (n),A timing bug solved the glitch of the first half of "Onescreen Colonies #2", but getting the LA-7800 chip to handle the demo's second half is going to take a while:



And it's a pity because the next major release is in the works, with the ability to redefine the keys of the virtual joystick (no longer limited to the cursors, Z and X) and a new sibling to CPCEC and ZXSEC: CSFEC.


Craigsbar, I also wish I could extend CPCEC's extra ROM support, but the user interface is very limited at the moment: please remember that these emulators must compile both on Windows, where we have plenty of widgets, and on SDL2, where I have none and I must improvise with my own snippets of code. Writing INI files outside the emulator, as seen already in this thread and the docs, should do at the moment.
(if you can't see the banner right now my server is currently offline)

cngsoft

At last "Onescreen Colonies #2" runs as intended! The LA-7800 horizontal-vertical synchronisation chip is a subtle beast.



20220412 -- twenty-third public release. CSFEC is a new Commodore 64 emulator: it passes several tests from the PC64 suite (CPUTIMING, CPUPORT and the entire MOS 6510 opcode set) but fails others (IRQ, NMI and all CIA tests); it supports up to two extra SID chips (either $D420 and $D440 or $DE00 and $DF00) but the VIC-II emulation is incomplete (no badline handling, no sprite contention); it can load PRG files and play T64 and TAP tape images, but it doesn't emulate the C1541 disc drive yet and thus cannot handle D64 disc images at all. New virtual joystick interface: the user can redefine the keys that simulate the virtual joystick instead of sticking to the keys Z and X and the cursors. Tape analysis can detect musical loaders: tape acceleration will be temporarily disabled to ensure that songs play normally. Fixed a bug in the Z80 (the internal timings of OUT (n),A were wrong) and the LA-7800's horizontal synchronisation (both reported by Hicks): the CPC demo "Onescreen Colonies #2" behaves properly.
(if you can't see the banner right now my server is currently offline)

grouik1er

Hi? Playing SRAM under CPCEC, i'm in front of the Sorceress and the game as me to press [copy] to continue.
[copy] is on the left on the space bar on a real cpc but "alt" is not mapped on [copy] ?

SkulleateR

Quote from: grouik1er on 22:07, 03 May 22Hi? Playing SRAM under CPCEC, i'm in front of the Sorceress and the game as me to press [copy] to continue.
[copy] is on the left on the space bar on a real cpc but "alt" is not mapped on [copy] ?
It's on the INS Button (insert) :)

grouik1er

Quote from: SkulleateR on 00:09, 04 May 22
Quote from: grouik1er on 22:07, 03 May 22Hi? Playing SRAM under CPCEC, i'm in front of the Sorceress and the game as me to press [copy] to continue.
[copy] is on the left on the space bar on a real cpc but "alt" is not mapped on [copy] ?
It's on the INS Button (insert) :)
thanks , where find the keyboard map for CPCEC, Barbarian impossible to play "Return" don't choose mode.
No problem with winape

sb1903

#241
I still enjoy this emulator a lot - so, again, big thanks to @cngsoft .

I noticed that some games on the CPC unfortunately don't support the second fire button, and instead use the spacebar key as a replacement, forcing the player to have one hand on the joystick and the other on the keyboard. I therefore wrote a small patch that makes the second fire button giving out a spacebar instead of 'Z' if the option is activated. Maybe somebody finds it useful and maybe you @cngsoft want to consider to add this function.

--- cpcec.c.bak 2022-05-06 17:19:39.227255646 +0200
+++ cpcec.c 2022-05-06 19:16:13.969255060 +0200
@@ -3225,6 +3225,7 @@
 // auxiliary user interface operations ------------------------------ //
 
 BYTE key2joy_flag=0; // alternate joystick buttons
+BYTE firezspace_flag=0; // replace fire 'Z' with spacebar
 char txt_error_snap_save[]="Cannot save snapshot!";
 char file_pattern[]="*.sna;*.rom;*.crt;*.cpr;*.ini;*.mld;*.dsk;*.cdt;*.csw;*.wav";
 
@@ -3297,6 +3298,7 @@
  "0x0400 Virtual joystick\tCtrl+F4\n"
  "0x0401 Redefine virtual joystick\n"
  "0x4400 Flip joystick buttons\tCtrl+Shift+F4\n"
+    "0x4402 Flip Fire Z to spacebar\n"
  "0x8521 No lightgun\n"
  "0x8522 Trojan Light Phaser\n"
  "0x8523 Gunstick (MHT)\n"
@@ -3392,6 +3394,7 @@
  session_menucheck(0x4900,tape_fastload);
  session_menucheck(0x0400,session_key2joy);
  session_menucheck(0x4400,key2joy_flag);
+    session_menucheck(0x4402,firezspace_flag);
  session_menuradio(0x0601+multi_t-1,0x0601,0x0604);
  session_menuradio(0x8501+crtc_type,0x8501,0x8505);
  session_menucheck(0x8508,!crtc_hold);
@@ -3425,6 +3428,8 @@
  video_vsync_max=crtc_hold?VIDEO_VSYNC_HI*2-VIDEO_LENGTH_Y:VIDEO_VSYNC_HI;
  kbd_joy[4]=kbd_joy[6]=0x4C+key2joy_flag;
  kbd_joy[5]=kbd_joy[7]=0x4D-key2joy_flag;
+    if (firezspace_flag && kbd_joy[4]==0X4D) kbd_joy[4]=kbd_joy[6]=0X2F;
+    if (firezspace_flag && kbd_joy[5]==0X4D) kbd_joy[5]=kbd_joy[7]=0X2F;
  #if AUDIO_CHANNELS > 1
  session_menuradio(0xC401+audio_mixmode,0xC401,0xC404);
  for (int i=0;i<3;++i)
@@ -3593,6 +3598,9 @@
  if ((t[5]=session_scan("FIRE 2",s))>=0)
  for (int i=0;i<length(t);++i) kbd_k2j[i]=t[i];
  break;
+        case 0x0402:
+            firezspace_flag = ! firezspace_flag; // FLIP FIRE 'Z' TO SPACE OR 'Z'
+            break;
  case 0x8501: // CRTC0
  case 0x8502: // CRTC1
  case 0x8503: // CRTC2

As you can see, the change is very simplistic (just 8 added lines of code). The setting of this functionality is not stored, so this must be toggled on individually every time cpcec is restarted (however, this probably makes sense as the functionality is only useful for certain games). I have tested it only on Linux. There, I tested it with the games Spindizzy and Harrier Attack, and it did what it is supposed to do. Especially, Spindizzy becomes a lot more playable with the break on the joystick button rather than having to press the space key.

cngsoft

The latest posts here are interesting because of their common focus: keyboard definition. Grouik1er's question is easy to answer (the big and small ENTER keys from the CPC are mapped to the big and small ENTER of modern keyboards) but Sb1903 goes further; his idea of mapping a joystick button to SPACE is one instance of a more general case I've been considering lately: giving the user the ability to define the whole keyboard+joystick mappings. I don't know how to implement it in a way that could please everyone; WINAPE's "Input" dialog comes to mind:


Other than that I have few CPC-themed news to share. The next release will include a small bugfix: the intro "Simply the bests" proves that 32K screens are compatible with the PLUS SSSL:
(if you can't see the banner right now my server is currently offline)

eto

Quote from: cngsoft on 13:13, 11 May 22WINAPE's "Input" dialog comes to mind
yes, that would be highly appreciated. Maybe some defaults for "normal" keyboards that can be adjusted if required. 

sb1903

Yes, I also think this is a great idea. Looking forward to it, thanks a lot :)

cngsoft

#245
New month, new version.


20220531 -- minor patch adding a new power-up boost option (enabled by default) that tells the emulators to trap boot procedures and speed them up. Printing a disassembly now includes the source bytes, ensuring that the binary can be always rebuilt even if the disassembly is ambiguous. The Z80 operations RETN and RETI are now identical; telling them apart is up to the NMI-issuing hardware. The Plus ASIC SSSL function is now 32k-compatible, as required by the intro "Simply the Bests". Simpler ZX ULA memory contention model: the timing buffer is now 128k long instead of 256k. The VIC-II chip is more accurate: slowdowns caused by badlines and sprite fetching are emulated (Extend's "Fellas", "HVSC 10 Years" intro...), effectively enabling badline manipulation (Archmage's "Data Zombies", Focus' "Ms. Pac Man", Excess' "Funny Rasters"...), DMA-delay horizontal scrolling ("Creatures", Tempest's "Rewind"...) and sprite stretching (Oxyron's "20 Years"). The default palette is now Community-Colors instead of Colodore. The CIA chips are more accurate too (TRSI's "4Krawall") but they don't pass the PC64 test suite yet. The internal SID filter is now partially emulated; the user can manually disable it. Minor optimisations through "likely/unlikely" branching hints.
(if you can't see the banner right now my server is currently offline)

cngsoft

#246
Minor changes and additions.


20220615 -- minor patch fixing several glitches: the Win32 binaries use timeBeginPeriod and timeEndPeriod because of recent changes in Win10; the emulators ensure that 'frame_pos_y' and 'video_pos_y' match properly; the Z80 module handles dummy IX/IY opcodes without the unreliable macros Z80_BEWARE and Z80_REWIND; the VIC-II chip avoids retriggering sprites ("Gothik", Booze Design's "Sprite Invaders") and clips them properly if they sit on screen edges (Singular's "Smooth and Wonders"). The filter of the SID chip is now more detailed, and its third voice's oscillator returns more realistic values: "Mazemania" no longer hangs at the beginning of a level. CSFEC can load extra colour palettes from VPL files, either old style "RR GG BB D" or new "RR GG BB".
(if you can't see the banner right now my server is currently offline)

cngsoft

#247
A new month dawns, a minor patch drops.

20220707 -- minor patch replacing the old option "Zoom by integer" with a new submenu "Window" with options that set the size of the window, ranging from 100% to 300%, that also stick between sessions (suggested by Xyphoe), and turning the options "Pixel filter" and "Blend scanlines" into "X-blending", "Y-blending" and "Frame blending", that respectively blur the image horizontally, vertically and dynamically. Several improvements in the VIC-II (sprite crunching: Carrion & Crest's "Heraklion", Arise's "Merswiny"; line crunching: Samar's "Ukiyo") and the SID (ports 27 and 28: second chip detection in "To Norah", sound effects of "Cloud Kingdoms"; wave shapes: song of "HVSC 10 Years"; filter based on the Chamberlin algorithm). The command line parameter `-c0..-c7` is now `-c0..c9` and includes the fifth mode, average scanlines.
(if you can't see the banner right now my server is currently offline)

TotO

Nice work in progress.

You know my point of view about the useless fake filters. ;)
(they are not representative of the CRT display)

I'm realy more impressed by your efforts around the CRTC accuraty! 8)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

WiltshireWizard

#249
z

Powered by SMFPacks Menu Editor Mod