Page 1 of 1
Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 3:38 pm
by Bas
As I'm developing a game for the C64, I'd like to know how accurate the C64 core is compared to the original machine and x64sc in VICE. I don't have a real C64 anymore but I'd like my game to work properly on the real hardware.
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 5:40 pm
by cathrynmataga
I just know from years of development on mobile and game platforms that the emulators are never quite right. I developed for-sale Gameboy games that were sold in stores, mostly on emulator, but for the final test, I need real hardware. If you're going to go to the effort of creating a game for C64, I'd consider getting one. How much are real C64 these days?
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 5:57 pm
by IRONBERG
Ive done just this and used the mister core for bugtesting. (Fast loading is a bless) The mister is, if not perfect. As close as it gets to the real deal. Your program/game should work more or less indistinguishable to each other in both setups.
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 6:20 pm
by Armakuni
XVICE sc is supposed to be the most accurate recreation we have of the C64
The MiSTer core is a lot better than it was before Sorg put some work into it a few years ago. Its origins are in FPGA64 which was developed for the C-One FPGA, the predecessor to the Turbo Chameleon.
FPGA64 is the only open source C64 FPGA core though and even the last builds of that are not open as it uses code from the TC development.
It does have some edge case issues in the VIC2 still for example but it is good enough
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 6:52 pm
by rhester72
I'd argue Z64K is more accurate than x64sc if strict accuracy is desired. Hoxs64 is a close second. VICE is pretty far behind, all due respect.
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 8:53 pm
by Retro-Nerd
I actually prefer Denise, which is pretty much what you'd expect from a modern and accurate C64 emulator these days. Haven't tested the MiSTer core that much though. Some demanding scene demos are always a good test case.
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 9:21 pm
by Armakuni
rhester72 wrote: ↑Sun Sep 03, 2023 6:52 pm
I'd argue Z64K is more accurate than x64sc if strict accuracy is desired. Hoxs64 is a close second. VICE is pretty far behind, all due respect.
VICE is cycle accurate though including the1541 drive emulation. It is that accurate it's been used as a test suite for C64 FPGA core development, it's had some development team behind it over the years some members have also helped on FPGA core development for the likes of the Turbo chameleon
Both U64 and Turbo chameleon FPGA cores are more accurate than MiSTers core and have more features but are closed core commercial products focused on one system.
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 9:24 pm
by Armakuni
Retro-Nerd wrote: ↑Sun Sep 03, 2023 8:53 pm
I actually prefer Denise, which is pretty much what you'd expect from a modern and accurate C64 emulator these days. Haven't tested the MiSTer core that much though. Some demanding scene demos are always a good test case.
Yes scene demos are where some very minor edge case issues appear but it is minimal. Considering the state the core was in a few years ago Sorg has done some great work on it
Re: Accuracy of the C64 Core
Posted: Sun Sep 03, 2023 9:42 pm
by rhester72
Armakuni wrote: ↑Sun Sep 03, 2023 9:21 pm
rhester72 wrote: ↑Sun Sep 03, 2023 6:52 pm
I'd argue Z64K is more accurate than x64sc if strict accuracy is desired. Hoxs64 is a close second. VICE is pretty far behind, all due respect.
VICE is cycle accurate though including the1541 drive emulation. It is that accurate it's been used as a test suite for C64 FPGA core development, it's had some development team behind it over the years some members have also helped on FPGA core development for the likes of the Turbo chameleon
Both of the emulators I noted are cycle-accurate (for what that means, which isn't what most people seem to think! All it means is that emulated instructions take the proper number of cycles!) and, to their credit, the VICE team over the past two years or so has used them as a reference to improve the accuracy of their own emulation, so all ships have risen somewhat with the tide. That was the point I was making - VICE is no longer considered the gold standard in accuracy, and hasn't been for a good while.
Re: Accuracy of the C64 Core
Posted: Mon Sep 04, 2023 6:43 am
by Armakuni
Yes that is what cycle accurate means but once you hit that and timing accuracy with all undocumented features where is there left to go ?
So it's more a personal preference at least with VICE it has integration with C64 Studio which is handy
Re: Accuracy of the C64 Core
Posted: Mon Sep 04, 2023 7:10 am
by rhester72
Well, VICE achieved cycle accuracy over half a decade ago...and is still going strong, so I guess there was definitely somewhere to go =)
CPU cycle accuracy is the first step towards true accuracy, but nowhere near the last. Add in the fact that the SID is a true analog device and you can see even more areas where perfection will never be achieved.
Re: Accuracy of the C64 Core
Posted: Mon Sep 04, 2023 7:34 am
by Armakuni
rhester72 wrote: ↑Mon Sep 04, 2023 7:10 am
Well, VICE achieved cycle accuracy over half a decade ago...and is still going strong, so I guess there was definitely somewhere to go =)
CPU cycle accuracy is the first step towards true accuracy, but nowhere near the last. Add in the fact that the SID is a true analog device and you can see even more areas where perfection will never be achieved.
The issue with SID and more with the 6581 is the analogue filters were all over the place but that was fixed with the 8580 and why it's become the scene standard. The filters are the only analogue part too
You could argue the 8580 is the better chip too and digifix solves the 6581 sample playback levels.
ARMSID and FPGASID are very popular replacements now and Sorg even spent a lot of time with SID on the MiSTer core not that long ago. The 8580 in the core isn't bad at all. We will reach a point where drop in modern replacements are the only option
Re: Accuracy of the C64 Core
Posted: Mon Sep 04, 2023 7:43 am
by LamerDeluxe
You can even choose between lots of 6581 filter variations on the MiSTer, to simulate the difference between individual chips.
Re: Accuracy of the C64 core
Posted: Mon Sep 04, 2023 10:09 am
by lister_of_smeg
rhester72 wrote: ↑Sun Sep 03, 2023 9:42 pm
Both of the emulators I noted are cycle-accurate (for what that means, which isn't what most people seem to think! All it means is that emulated instructions take the proper number of cycles!) and, to their credit, the VICE team over the past two years or so has used them as a reference to improve the accuracy of their own emulation, so all ships have risen somewhat with the tide. That was the point I was making - VICE is no longer considered the gold standard in accuracy, and hasn't been for a good while.
Cycle accurate means more than that.. It means having stuff during multi-cycle instructions happen on the correct cycle. Lets say you have a two byte, three cycle instruction that fetches and decodes on the first two cycles and writes to memory on the third. You need to make sure that the memory address is only changed during the third emulated cycle. You also need any emulated peripheral or support IC to 'see' the PC on the address bus, and the respective fetched opcode/immediate on the data bus during the first two emulated cycles, then the memory write address and the written byte during the third cycle. Then you need those devices' memory accesses/bus snoops to also occur on the correct cycle.
Re: Accuracy of the C64 core
Posted: Mon Sep 04, 2023 12:25 pm
by rhester72
lister_of_smeg wrote: ↑Mon Sep 04, 2023 10:09 am
Cycle accurate means more than that.. It means having stuff during multi-cycle instructions happen on the correct cycle. Lets say you have a two byte, three cycle instruction that fetches and decodes on the first two cycles and writes to memory on the third. You need to make sure that the memory address is only changed during the third emulated cycle. You also need any emulated peripheral or support IC to 'see' the PC on the address bus, and the respective fetched opcode/immediate on the data bus during the first two emulated cycles, then the memory write address and the written byte during the third cycle. Then you need those devices' memory accesses/bus snoops to also occur on the correct cycle.
Fair...I didn't bother with the nuance because it doesn't speak to the two real pain points of accuracy, which are supporting chips (typically graphics and sound, in that order) and integration/overlap of same (which is where the parallelism of FPGA shines, as in the real world chips typically don't wait around for one another except during bus arbitration).
Re: Accuracy of the C64 Core
Posted: Mon Sep 04, 2023 1:26 pm
by lagerfeldt
Bas wrote: ↑Sun Sep 03, 2023 3:38 pm
As I'm developing a game for the C64, I'd like to know how accurate the C64 core is compared to the original machine and x64sc in VICE. I don't have a real C64 anymore but I'd like my game to work properly on the real hardware.
My experience is that MiSTer's C64 core can work better than VICE on my Mac, for some reason. It's a bit of hit and miss with some of the demos, but some will play in MiSTer that won't in VICE and vice versa (no pun intended).
I have twelve real C64s and an Ultimate II cartridge, but I mainly use my MiSTer for C64 daily play.
My pet peeve is the sound chip or more precisely the 6581 (since 8580s are virtually identical in sound) and how the filter sounds - and varies - between production batches, and also depending on the related C10+C11 caps in the machine. So multiple factors, not just the chip itself as some seem to think.
One thing I like very much with the MiSTer's C64 core is the ability to load a custom 6581 filter setting: viewtopic.php?p=66799#p66799
That one is in the sweet spot.
Re: Accuracy of the C64 Core
Posted: Mon Sep 04, 2023 5:22 pm
by Bas
Interesting to read the discussion and I wish I could contribute more to the core to make it even more accurate than it already is. Not owning a C64 is more due to constraints on space than budget. I guess I'll just farm out the testing to some friendly souls on the internet when the time comes.
Re: Accuracy of the C64 Core
Posted: Thu Jan 04, 2024 10:20 pm
by Amok64
I have tested 190 highly demanding demos, using all possible existing VIC2 tricks and there's no double the Mister 64 core is a real beast when it comes to accuracy. If all Censor Design demos, all Booze design demos run exactly like on true hardware, you can trust the Mister c64 core accuracy.