Accuracy of the C64 Core

Bas
Top Contributor
Posts: 550
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 70 times
Been thanked: 256 times

Accuracy of the C64 Core

Unread post 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.

cathrynmataga
Posts: 111
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 145 times
Been thanked: 19 times

Re: Accuracy of the C64 Core

Unread post 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?

IRONBERG
Posts: 22
Joined: Fri Mar 18, 2022 11:22 am
Been thanked: 3 times

Re: Accuracy of the C64 Core

Unread post 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.

User avatar
Armakuni
Posts: 189
Joined: Fri Jan 13, 2023 10:37 am
Has thanked: 35 times
Been thanked: 27 times

Re: Accuracy of the C64 Core

Unread post 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

rhester72
Top Contributor
Posts: 1119
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 171 times

Re: Accuracy of the C64 Core

Unread post 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.

User avatar
Retro-Nerd
Posts: 148
Joined: Fri Jul 08, 2022 2:47 am
Has thanked: 7 times
Been thanked: 42 times

Re: Accuracy of the C64 Core

Unread post 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.

User avatar
Armakuni
Posts: 189
Joined: Fri Jan 13, 2023 10:37 am
Has thanked: 35 times
Been thanked: 27 times

Re: Accuracy of the C64 Core

Unread post 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.

User avatar
Armakuni
Posts: 189
Joined: Fri Jan 13, 2023 10:37 am
Has thanked: 35 times
Been thanked: 27 times

Re: Accuracy of the C64 Core

Unread post 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

rhester72
Top Contributor
Posts: 1119
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 171 times

Re: Accuracy of the C64 Core

Unread post 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.

User avatar
Armakuni
Posts: 189
Joined: Fri Jan 13, 2023 10:37 am
Has thanked: 35 times
Been thanked: 27 times

Re: Accuracy of the C64 Core

Unread post 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

rhester72
Top Contributor
Posts: 1119
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 171 times

Re: Accuracy of the C64 Core

Unread post 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. :)

User avatar
Armakuni
Posts: 189
Joined: Fri Jan 13, 2023 10:37 am
Has thanked: 35 times
Been thanked: 27 times

Re: Accuracy of the C64 Core

Unread post 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

User avatar
LamerDeluxe
Top Contributor
Posts: 1181
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 828 times
Been thanked: 266 times

Re: Accuracy of the C64 Core

Unread post by LamerDeluxe »

You can even choose between lots of 6581 filter variations on the MiSTer, to simulate the difference between individual chips.

User avatar
lister_of_smeg
Posts: 44
Joined: Mon May 25, 2020 3:11 am
Has thanked: 2 times
Been thanked: 20 times

Re: Accuracy of the C64 core

Unread post 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.

rhester72
Top Contributor
Posts: 1119
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 171 times

Re: Accuracy of the C64 core

Unread post 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).

User avatar
lagerfeldt
Posts: 158
Joined: Mon Jan 03, 2022 8:32 pm
Location: Denmark
Has thanked: 31 times
Been thanked: 79 times
Contact:

Re: Accuracy of the C64 Core

Unread post 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.

Patron of MiSTer + theypsilon + Jotego Team + Coin-Op Collection + Pierco + Nullobject

MiSTer RePlay website

Ultimate SID Collection website

Bas
Top Contributor
Posts: 550
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 70 times
Been thanked: 256 times

Re: Accuracy of the C64 Core

Unread post 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. ;-)

Amok64
Posts: 2
Joined: Thu Jun 15, 2023 5:48 pm
Been thanked: 4 times

Re: Accuracy of the C64 Core

Unread post 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.

Post Reply