News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

AMSpiriT, a new CPC emulator for Windows

Started by Dmanu78, 19:50, 23 April 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lmimmfn

#25
Would it be possible to have a feature in the emulator to log to a file all addresses visited by the PC, count of how often visited and whether a read/write instruction was issues and if that was a previously visited PC address(self modifying code scenario).

This would make decompiling older games, distinguishing data vs code and seeing if any optimizations are possible a lot easier.

I don't have any plans, I just found it really cumbersome decompiling buggy boy, manually finding main loop, sound, gfx generating routines etc.

It has potential use cases of enriching decompiled games with labels, data vs code to allow them to be modified a lot easier than what exists today, adding routines/recalculating jmp addresses etc.
6128 for the win!!!

Dmanu78

After long months of waiting, I am pleased to announce the official release of the new version of Amspirit 0.845b. :)

The big novelty of this new version is the addition of complete emulation of the CRTC 4 called "pre-ASIC" equipping the latest generations of CPC "old" before the arrival of the CPC+ range; It's a preview of CPC+ emulation that contains the same technical base.

Then for secondary news:
  • Additional ROMs are now managed and you can add up to 15 new ROMs simultaneously.
  • A big job has been done on the management of the monitor (CTM) to manage distortion effects in particular and the latest hard pixel scroll techniques recently discovered by @CheshireCat and @Longshot.
  • A major export project for the Amspirit Core has been carried out in order to migrate it to a dedicated library, independent of any proprietary API. This sensitive operation took me several months but will ultimately make it easier to port to other OS than Windows :)
  • Finally, many small corrections relating to emulation itself have been made, some improvements such as file management CDT (addition of "Direct Recording" BLOCK allowing some tape files to be read correctly).
Amspirit now emulates almost perfectly the 4 types of CRTC present in the range of CPC "Old". This result would never have been possible without the precious assistance of @Longshot, his research work compiled in the compendium and his formidable test tools "Shaker" which allowed Amspirit to reach a very high level of precision.

Finally, last novelty, Amspirit now has its official website. For now it's quite minimalist but it's a start. I thank @Siko who agreed to create this dedicated portal :

https://amspirit.amstrad.info/

From now on, the latest versions of AmspiriT will be directly downloadable from this site.

The next step in Amspirit's development will focus on the "CPC plus" and GX4000 range. Still a lot of work to come... ;)

TotO

Just speak about CPC or GX/Plus and everybody will understand.
Adding "old" and "plus" to "cpc" is just useless and confusing. ;)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Joseman

Hi @Dmanu78

Great great work here!!

I don't know why when i try a new version of any emulator, the first thing that i do, crash the emulator :-[

This time was with Zap the balls, when the game tries to read the menu, it crash.

https://www.cpc-power.com/index.php?page=detail&onglet=dumps&num=1322

Keep the good work!!

P.S. I'm curious with the Debugger Icon, what plans do you have for that?

Gryzor

Thanks for updating it, must definitely give it a try🙂

CheshireCat

Thanks for the great job, @Dmanu78 !
Amspirit already works under Linux thanks to Wine.

Your emulator is the only one which works with my BASIC program (two INPs only) to detect the CRTC type 😁

Again, tanks for the huge amount of time you spent, along with @Longshot, to release this emulator !
Use SJASMPLUS, the very best Z80 assembler !
Bugless, highly modifiable, Sources clear & well organized :D

Devlin

Since I'm here, I'm posting the cpu usage on my laptop's Core i7-6500U (iGPU Intel HD Graphics 520)

It runs perfectly :)
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Gryzor

Quote from: Devlin on 12:33, 18 April 23Since I'm here, I'm posting the cpu usage on my laptop's Core i7-6500U (iGPU Intel HD Graphics 520)

It runs perfectly :)
Buuuut what about the process? 

Devlin


Quote from: Gryzor on 12:36, 18 April 23
Quote from: Devlin on 12:33, 18 April 23Since I'm here, I'm posting the cpu usage on my laptop's Core i7-6500U (iGPU Intel HD Graphics 520)

It runs perfectly :)
Buuuut what about the process?
I didn't have the space on my screen! I'm not exactly rocking my usual desktop setup right now, so i'm limited to a single 1080p screen, and not my 4k/1080p dual setup
CPC464 & CPC6128 + USIfAC II + Revaldinho 512k(universal cpld ver) - Schneider CRT TV
Administrator of Amstrad Discord : https://discord.gg/ksWvApv

Dmanu78

@Joseman :
well done for "Zap the ball". I had a little bug in the FDC emulation (variable not initialized properly). >:(
More generally, the FDC emulation remains partial. I mainly concentrated my work on the video emulation (GA/CRTC)
I finish some tests and I will publish a new version with the fix. ;)

The Debugger Icon is for internal use only for now. It helps me to debug the emulator during my testing phases. The development of a more universal (multi OS) AmspiriT Core based debugger is planned with the help of developers. ;)

Dmanu78

Quote from: Dmanu78 on 10:51, 19 April 23@Joseman :
well done for "Zap the ball". I had a little bug in the FDC emulation (variable not initialized properly). >:(
More generally, the FDC emulation remains partial. I mainly concentrated my work on the video emulation (GA/CRTC)
I finish some tests and I will publish a new version with the fix. ;)
The Debugger Icon is for internal use only for now. It helps me to debug the emulator during my testing phases. The development of a more universal debugger (multi OS) based on AmspiriT Core is planned with the help of developers. ;)

McArti0

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.

Dmanu78

A new version of AmspiriT (v0.863b) has just been posted on the official portal :
https://amspirit.amstrad.info/

This version brings mainly corrections on various small bugs which were returned to me after the release of the previous version of AmspiriT.

Along with minor fixes in FDC, PSG  and CRTC emulation, improvements in External ROM management, this version introduces command line arguments to make it easier to start programs.

The corrections made to the FDC emulation allow, among other things, to pass the detection test in the game "Open Tower Defense" et to launch Zap the ball. ;)



With this new version of AmspiriT, you surely have the best emulation quality (visually considered) that has ever been produced on the CPC. Thanks to the huge technical support of @Longshot, all CRTC present in the "CPC" (except "plus/GX") are now emulated almost perfectly, (the results of the shaker acid-tests allow me to be fairly categorical about it), the accuracy of the signals timings managed at 1/16Mhz between Z80 <=> GA <=> CRTC is unrivalled, especially allowing to pass the original protection used for REVOLOG demo by @Longshot, that none of the other CPC emulators can execute at this time.(I have put the DSK for info - usable in CRTC 0).
You cannot view this attachment.

Of course there a huge amount of improvements to do, as usual on an emulator. I should rewrite the FDC management for more accuracy and the CTM644 emulation (Amstrad monitor) is far from perfect yet.

In parallel, last (good i hope) surprise, compilation tests of the Core AmspiriT under other systems than Windows (Linux in particular) are currently in progress with probing results. News on this subject should arrive soon :)

andycadley

Very cool, really impressive work. I can only hope we get to the point where we can have similar accuracy for the Plus hardware some day.

megachur

Quote from: Dmanu78 on 20:21, 14 May 23the accuracy of the signals timings managed at 1/16Mhz between Z80 <=> GA <=> CRTC is unrivalled, especially allowing to pass the original protection used for REVOLOG demo by @Longshot, that none of the other CPC emulators can execute at this time.(I have put the DSK for info - usable in CRTC 0).
Revolog_FIRST-VERSION.zip
Hello @Dmanu78 !

Don't be too pretentious... My emulator is also equally accurate in 16Mhz/4Mhz/1Mhz emulation of the various cpc components and runs longshot's first version of REVOLOG without problem....

I'm glad to see that your emulator is progressing well, and not only on the CRTC/CTM-LA7800 couple...

Good luck for the continuation of the programming of the emulation of the cpc and in particular the components like the ASIC which remains under documented (where is the COMPENDIUM of the ASIC ;-)?!?).

Try it on Windows / MacOS / Raspberry Pi or Linux ;-) !

--> https://www.cpcwiki.eu/forum/emulators/cpcepower-v2105/

or on cpc-power : https://www.cpc-power.com/cpcarchives/index.php?page=articles&num=73

the story about the initial version is here (in french language) : https://www.cpc-power.com/cpcarchives/index.php?page=articles&num=446

roudoudou

Quote from: megachur on 06:05, 16 May 23Don't be too pretentious... My emulator is also equally accurate in 16Mhz/4Mhz/1Mhz emulation of the various cpc components and runs longshot's first version of REVOLOG without problem....


My pronouns are RASM and ACE

CheshireCat

Quote from: megachur on 06:05, 16 May 23Don't be too pretentious... My emulator is also equally accurate in 16Mhz/4Mhz/1Mhz emulation of the various cpc components and runs longshot's first version of REVOLOG without problem....
Hey, nice !

Why don't you contact Longshot in order to add your emulator to Shakerland ? It would be interesting to see a bit of competition among the 99% accurate emulators !

In the meantime I will test it on my Raspi. It should be better than the one I use for now.
Use SJASMPLUS, the very best Z80 assembler !
Bugless, highly modifiable, Sources clear & well organized :D

megachur

#42
Quote from: CheshireCat on 13:44, 16 May 23Hey, nice !

Why don't you contact Longshot in order to add your emulator to Shakerland ? It would be interesting to see a bit of competition among the 99% accurate emulators !

In the meantime I will test it on my Raspi. It should be better than the one I use for now.

Hey,

Just because I'ven't the time now to correct crtc (and CTM - SANYO LA7800 - HSYNC/VSYNC) emulation and do 400 screenshots and tests ;-) !
But maybe one day...Who knows ?

@CheshireCat :
--> Don't hesitate to give me feedback on the Raspberry Pi version... Knowing that the CPU of a Pi4 is a bit tight to run the emulation of the Plus... In some cases such as intensive use of hardware sprites ...
The current version already works almost everything from the cpc games and demos library ;-) !

SyX

Quote from: Dmanu78 on 20:21, 14 May 23A new version of AmspiriT (v0.863b) has just been posted on the official portal :
https://amspirit.amstrad.info/

This version brings mainly corrections on various small bugs which were returned to me after the release of the previous version of AmspiriT.

Along with minor fixes in FDC, PSG  and CRTC emulation, improvements in External ROM management, this version introduces command line arguments to make it easier to start programs.

The corrections made to the FDC emulation allow, among other things, to pass the detection test in the game "Open Tower Defense" et to launch Zap the ball. ;)

.
.
.

Of course there a huge amount of improvements to do, as usual on an emulator. I should rewrite the FDC management for more accuracy and the CTM644 emulation (Amstrad monitor) is far from perfect yet.

In parallel, last (good i hope) surprise, compilation tests of the Core AmspiriT under other systems than Windows (Linux in particular) are currently in progress with probing results. News on this subject should arrive soon :)
Congratulations! :) :) :)

I have seen that CRTC 2 emulation has improved since the previous version and now my code works exactly like in real CPCs with this kind of CRTC.

In this moment my main complains are the FDC emulation (although that pesky Basun works fine, Puffy's Saga doesn't load at all); the monitor emulation, my interlace fx (making one scanline half width every 2 frames) doesn't work like in the real monitor; and of course, the debugger, for me the debugger is a vital feature ;)

Longshot

Quote from: megachur on 06:05, 16 May 23My emulator is also equally accurate in 16Mhz/4Mhz/1Mhz emulation of the various cpc components and runs longshot's first version of REVOLOG without problem....
It's a pity that you didn't continue the development because few emulators are based on the fastest frequency.
Without having read the history for which you gave the link, it was difficult to see that the emulator works on the basis of 16 Mhz.

I did some tests when I looked at how to detect it (see http://logonsystem.fr/down/shaker_addon.dsk). ::)

Unfortunately, it does not currently seem to benefit from this 16Mhz emulation precision on several subjects.
For example the pixel offset of mode 2 compared to other graphics modes, or the positioning and length of a split performed via an out(nn),a.

The interaction between the GA, the Z80A and the CRTC also poses problems.
For example, ram write instructions are not synchronized with the display.

Small detail concerning the protection of Revolog. It does not work on a real CRTC 1 (only CRTC 0 and 2).
Conversely, the game "007 The Living Daylights" should run without a Vsync in the center of the screen in CRTC 1.
Rhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!

CheshireCat

"Small detail concerning the protection of Revolog. It does not work on a real CRTC 1 (only CRTC 0 and 2)."

OMG ! The almighty powers of the Best Quality CRTC Of All Times might be all... Fake ?
I knew it !  8)
Use SJASMPLUS, the very best Z80 assembler !
Bugless, highly modifiable, Sources clear & well organized :D

megachur

#46
Quote from: Longshot on 20:48, 17 May 23
Quote from: megachur on 06:05, 16 May 23My emulator is also equally accurate in 16Mhz/4Mhz/1Mhz emulation of the various cpc components and runs longshot's first version of REVOLOG without problem....
It's a pity that you didn't continue the development because few emulators are based on the fastest frequency.
Without having read the history for which you gave the link, it was difficult to see that the emulator works on the basis of 16 Mhz.
I did some tests when I looked at how to detect it (see http://logonsystem.fr/down/shaker_addon.dsk). ::)
Unfortunately, it does not currently seem to benefit from this 16Mhz emulation precision on several subjects.
For example the pixel offset of mode 2 compared to other graphics modes, or the positioning and length of a split performed via an out(nn),a.
The interaction between the GA, the Z80A and the CRTC also poses problems.
For example, ram write instructions are not synchronized with the display.
Small detail concerning the protection of Revolog. It does not work on a real CRTC 1 (only CRTC 0 and 2).
Conversely, the game "007 The Living Daylights" should run without a Vsync in the center of the screen in CRTC 1.
I didn't say that I stopped development... :o

Thanks for the feedback... :D

I spent many hours to code it... and in particular to read the technical documentation of the hardware components of the cpc... The goal was to start from scratch as close as possible to the 'real' hardware! It's the same spirit that I sense in the AMSpirit coder! ;)

It's very good to have made now new test programs like the Shaker by you or FatMag by Roudoudou ( for the FDC) which will make it possible to go beyond these technical documents which are not always complete!

There are plenty of other subjects and not just CPC that also require my energy.
And in my daily use, and for the entire cpc software library, it works very well ;D !

But hey, for sure, I shouldn't be content with it and move on! Maximum motivation!!!

Dmanu78

Hi,
@megachur, sorry if I offended you, my wording was clumsy. I'm pleased to learn that you use the same technical base on your emulator as on Amspirit (Tstate for z80/16Mhz frequency). Like me, I think you are looking for an emulation without any compromise. :)
The development of an emulator is a long, long work of patience and meticulousness and I respect a lot the work of their author because I know how much it represents in time and energy. 
Every emulator has its strengths and weaknesses and the perfect emulator will never exist. But we are working to reach this impossible goal. Good luck for your further developments. :)
Indeed, the longshot compendium is a real benediction for emulators and developers. In my opinion, in terms of knowledge and understanding of the inner workings of CPC, Longshot has done more for the CPC community in 3 years than has been done in the last 30 years. He discovered new rupture techniques, completely solved the mystery of interlacing, developed with CheschireCat the horizontal and vertical (sub)pixel hardware scroll, discovered that CRTC 2 had a great potential but was unfairly denigrated...  I hope further demos will take advantage of his latest discoveries.
I didn't invent anything, Amspirit's visual rendering is just the direct application of the compendium's content, nothing more, nothing less.

@SyX : Thanks for your encouragement. Glad to know that CRTc 2 is properly emulated. I've mainly focused on CRTCs for the last 2 years. I know my FDC emulation is far from perfect. I have done minimal work on it, but I will have to restart from scratch. Lone gave me some valuable advice on the subject. I will also look at Roudoudou's work. The FDC is very interesting to study. 
A debugger is well planned. I don't have a specific date to announce but I'll keep it in mind.

@andycadley : yes the development of an Amspirit "plus" is planned, I don't know when, but it is planned... Be patient... the development of an emulator is a very long way... :)


SyX

Quote from: Dmanu78 on 09:08, 18 May 23@SyX : Thanks for your encouragement. Glad to know that CRTc 2 is properly emulated. I've mainly focused on CRTCs for the last 2 years. I know my FDC emulation is far from perfect. I have done minimal work on it, but I will have to restart from scratch. Lone gave me some valuable advice on the subject. I will also look at Roudoudou's work. The FDC is very interesting to study. 
A debugger is well planned. I don't have a specific date to announce but I'll keep it in mind.
And of course, I need to say that I love the status line in the emulator, where I can see in any moment the frequency of VBL/HBL/INT and how many scanlines the CRTC is generating. I am bored of patching old and specially new games with broken ruptures or bad use of R5 that put the CRT frequency out of the PAL range.

Dmanu78

Hello,

After a (relatively) long wait since the last official release, a new release of Amspirit is now available (number 0.953b).

No Killer feature for this release, it's an iteration of the previous version with a few bug fixes, improved support for the e-dsk format (protected games should now run better) and above all the addition of a number of missing ergonomic features.

You'll find details of the changes below:
- Snapshot file management (.SNA)
- Script (.CSL) and text (.txt) file management
- Miscellaneous fixes (CTM, FDC, PSG and CRTC 0/1 emulation)
- Enhanced e-dsk support
- Improved management of Additional Roms
- CPU load optimization: single or multi-thread option
- Drag & drop functionality for fast file loading.

Thanks again for your encouragement. I'm really enjoying developing this emulator. It's a real intellectual challenge and very stimulating. Above all, it's a personal project that I'm sharing with you. Amspirit is still very young, and obviously there's still a lot of work to be done. Lots of great things are planned for the future, but you'll just have to be patient. As most emulator authors will tell you, an emulator is built patiently, not in a hurry...

Full details on the new website : https://www.amspirit.fr/release-0-953/
Have fun :)

Powered by SMFPacks Menu Editor Mod