Transfering Commodore 128 Core

Discussion of developmental aspects of the MiSTer Project.
eriks5
Core Developer
Posts: 79
Joined: Sat May 21, 2022 11:51 am
Has thanked: 38 times
Been thanked: 182 times
Contact:

Transfering Commodore 128 Core

Unread post by eriks5 »

The C128 core has reached a releasable state, so I'd like to transfer the repository to the mister-devel org

Can I get the permissions for that?

To complete the release I would need to push the .rbf to the releases folder, and once the cores list on the wiki is updated the distribution repo will start picking it up, right?

Flandango
Core Developer
Posts: 386
Joined: Wed May 26, 2021 9:35 pm
Has thanked: 41 times
Been thanked: 325 times

Re: Transfering Commodore 128 Core

Unread post by Flandango »

eriks5 wrote: Wed Feb 22, 2023 1:02 pm

To complete the release I would need to push the .rbf to the releases folder, and once the cores list on the wiki is updated the distribution repo will start picking it up, right?

Correct

User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: Transfering Commodore 128 Core

Unread post by wark91 »

Hi,
You could asked on the MiSTer Disocrd for permissions.
Thanks

User avatar
Sorgelig
Site Admin
Posts: 875
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 211 times

Re: Transfering Commodore 128 Core

Unread post by Sorgelig »

I've invited you into MiSTer-devel. Check github, please.

eriks5
Core Developer
Posts: 79
Joined: Sat May 21, 2022 11:51 am
Has thanked: 38 times
Been thanked: 182 times
Contact:

Re: Transfering Commodore 128 Core

Unread post by eriks5 »

Thank you!

User avatar
Sorgelig
Site Admin
Posts: 875
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 211 times

Re: Transfering Commodore 128 Core

Unread post by Sorgelig »

There is one think i don't really like and i'm not sure what to do: Now we have C64 and C128 cores where later one is basically absorbed the whole C64.
While C64 is iconic computer, C128 is niche one. So giving up C64 core into favour of C128 is wrong by all means. It would be better to have/continue C64 core with extra C128 functionality.

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

Sorgelig wrote: Fri Feb 24, 2023 4:42 pm

There is one think i don't really like and i'm not sure what to do: Now we have C64 and C128 cores where later one is basically absorbed the whole C64.
While C64 is iconic computer, C128 is niche one. So giving up C64 core into favour of C128 is wrong by all means. It would be better to have/continue C64 core with extra C128 functionality.

With respect, couldn't the exact same thing be said about the 7800 core supplanting the 2600 one? I'd argue the 7800 was very niche next to the 2600, but it was also a superset, and thus the decision was made. Given you can easily create a MRA for the 128 core to 'appear' to be a pure C64 core, wouldn't that be the better way to go?

dmckean
Posts: 307
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 387 times
Been thanked: 95 times

Re: Transfering Commodore 128 Core

Unread post by dmckean »

rhester72 wrote: Fri Feb 24, 2023 5:23 pm
Sorgelig wrote: Fri Feb 24, 2023 4:42 pm

There is one think i don't really like and i'm not sure what to do: Now we have C64 and C128 cores where later one is basically absorbed the whole C64.
While C64 is iconic computer, C128 is niche one. So giving up C64 core into favour of C128 is wrong by all means. It would be better to have/continue C64 core with extra C128 functionality.

With respect, couldn't the exact same thing be said about the 7800 core supplanting the 2600 one? I'd argue the 7800 was very niche next to the 2600, but it was also a superset, and thus the decision was made. Given you can easily create a MRA for the 128 core to 'appear' to be a pure C64 core, wouldn't that be the better way to go?

This case is a tiny bit different because the 7800 core was a complete rewrite and didn't use the old 2600 core as a starting point.

Ultimately, this is really entirely Sorgelig's decision to make since he's the one that supports and actively develops the current C64 core. It's really up to him whether he wants to update two repositories every time he makes a change or risk possibly letting the C128 core fall too far out of sync.

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

I'm not sure it's so different. Adding C128 features to the C64 core vs. just maintaining the C128 core - much of which IS the C64 core - is really kind of the same thing either way, except one of them already exists today...so what you're describing seems less about what's right from a technical/implementaton PoV and more about "not invented here" syndrome. It's Sorg's project and his call to make, but it's all but impossible for me to imagine such a thing...it just doesn't make sense for no other reason than total inefficiency for no gain.

User avatar
ericgus09
Posts: 206
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: Transfering Commodore 128 Core

Unread post by ericgus09 »

Well the original C128 included a fully functional c64 mode so this core is true to the original .. that said it would be nice if when you type "GO64" in the C128 core it autolaunches and runs the existing C64 core .. Till then, I think keeping consistent with the spirit of the original machine is the better option here, to me its wrong to rip out the c64 functionality of the c128 core just because another core exists.. while I would love the "chaining of cores" I dont see that happening or happening soon.. OTOH I can certainly see the point about ingesting an entire existing core within this new core .. Maybe it would make more sense to merge them into one, and let the user decide via the settings which to initially boot into, but the C128 core really does need to be able to "GO64" since thats how the orig worked, also its good to note, that the "64" mode on a C128 had access to extra functionality a normal 64 did not, there is some difference with the 64 implementation on the original c128 eg you could enable the faster speed in 64 mode, access the 80 column VDC, etc. .. IDK .. other folks have to make those decisions ..

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

Ironically, the C128 core allows you to use it as a 'pure' C64 core via MRA file where you never have to see the 128 side at all, it's a full replacement for the C64 core in every respect (because it contains the entire C64 core, quite literally!).

There's zero reason for both to exist. The question comes down to whether you allow the C128 core to entirely replace the older core, or whether you start from scratch and bolt on all the C128 components to the existing core. Not only is the latter more work, it's very literally already done...that's what the C128 core is, precisely, as it is now! The difference is that Sorg didn't write the add-on bits himself, which seems to be the real underlying concern.

R4M
Posts: 32
Joined: Wed May 27, 2020 2:27 pm
Has thanked: 2 times
Been thanked: 9 times

Re: Transfering Commodore 128 Core

Unread post by R4M »

I tried an action replay crt file, which works on the C64 but the C128 core won't start when it is loaded. This is an important freezer, which should run on a C64 core. Therefore it is definitely too early to replace the C64 core.

tomxp411
Posts: 13
Joined: Fri Jul 17, 2020 4:32 am
Has thanked: 2 times
Been thanked: 1 time

Re: Transfering Commodore 128 Core

Unread post by tomxp411 »

Sorgelig wrote: Fri Feb 24, 2023 4:42 pm

There is one think i don't really like and i'm not sure what to do: Now we have C64 and C128 cores where later one is basically absorbed the whole C64.
While C64 is iconic computer, C128 is niche one. So giving up C64 core into favour of C128 is wrong by all means. It would be better to have/continue C64 core with extra C128 functionality.

VICE keeps both a C64 and C128 emulator as separate products. There may be interest in more specialized hardware for the C64 at some point, and it's possible there won't be enough resources on the FPGA to include the full 128 emulation, in addition to the more specialized C64 accessories.

I suppose if it becomes a hassle to maintain the two cores in parallel, you could rename the 128 core "Commodore 64/128", so people aren't confused by the 64 disappearing.

However, as others have pointed out, a 128 in 64 mode is not quite the same as a real 64, and the quirks of this core mean it's not quite ready to be a full replacement for the 64 core - yet. Give it a year, maybe, and see where it's at then.

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

tomxp411 wrote: Fri Feb 24, 2023 11:24 pm

However, as others have pointed out, a 128 in 64 mode is not quite the same as a real 64, and the quirks of this core mean it's not quite ready to be a full replacement for the 64 core - yet. Give it a year, maybe, and see where it's at then.

Can you be very specific about that in terms of real-world impact, and what you expect will change over the next year that would make (any) 128 more 64 compatible than it was way back when? There was a single byte of memory that "bled through" on original hardware back in the day that affected precisely no software at all in the real world, but provided significant benefit to clever programmers. How is this different?

It's also worth noting this wasn't created in isolation. The fundamental code of the core is a direct copy of the C64 core. How you get any more compatible with a thing than containing the thing is something that is currently escaping me.

eriks5
Core Developer
Posts: 79
Joined: Sat May 21, 2022 11:51 am
Has thanked: 38 times
Been thanked: 182 times
Contact:

Re: Transfering Commodore 128 Core

Unread post by eriks5 »

When I started on this core, keeping it completely compatible with the C64 was not my goal. In fact, I considered that a near impossibility, as the C128 itself is only like 99% compatible and not the 100% Commodore liked you to believe. It's much more than just a single byte of memory, for example, the VDC is available and usable from the C64 mode. Eye of the Beholder uses this, it runs in C64 mode, but uses the VDC and turbo modes on a C128. Somehow switching cores when doing a "go64" would make that impossible. Also, the C128 is architecturally so much like the C64, it would still need all the C64 hardware anyway.

Other changes impact features from the C64 core as well. The configurable turbo modes that the C64 core has are disabled. Setting it to 3x or 4x speed will crash the 8502 and VIC. I haven't figured out why yet.

Cartridges that work on a real C64 but not a C128 are bound to not work on the C128 core as it is now either, regardless of the "pure" C64 settings. (In hindsight the word "pure" is overpromising.. I should have thought about that a bit more). Not sure if the Action Replay is supposed to work on a real C128. If it does, I should look into that. But if it doesn't on a real C128, I consider this "works as intended" at the moment.

From a maintenance perspective it's indeed much better to have a single unified core. But right now, the C128 core is not ready for that as it would be downgrading the C64 experience. The burden on maintaining the C128 core is on me. When Sorgelig makes changes to the C64 core I'll merge them into the C128.

Maybe in time we can indeed merge these two into one core. But I don't think it would do the C64 core justice to do that now.

User avatar
ericgus09
Posts: 206
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: Transfering Commodore 128 Core

Unread post by ericgus09 »

eriks5 wrote: Sat Feb 25, 2023 6:53 am

It's much more than just a single byte of memory, for example, the VDC is available and usable from the C64 mode. Eye of the Beholder uses this, it runs in C64 mode, but uses the VDC and turbo modes on a C128. Somehow switching cores when doing a "go64" would make that impossible. Also, the C128 is architecturally so much like the C64, it would still need all the C64 hardware anyway.

Ok thank you I knew there were some other interesting "quirks" with the 64 mode on a real 128 (I owned one back in the day --- and own one now) .. And yes while not massive, there are a number of programs and such that can and will exploit those things on a real C128 even in 64 mode .. the only one that I could think of at the time was the faster CPU in 64 mode .. I know where were a number of unique features like that.

Yea the C128 more more or less a C64 with a lot of "extras" layered on it.

User avatar
Goingdown
Posts: 38
Joined: Mon May 25, 2020 6:58 am
Has thanked: 5 times
Been thanked: 4 times

Re: Transfering Commodore 128 Core

Unread post by Goingdown »

eriks5 wrote: Sat Feb 25, 2023 6:53 am

Cartridges that work on a real C64 but not a C128 are bound to not work on the C128 core as it is now either, regardless of the "pure" C64 settings. (In hindsight the word "pure" is overpromising.. I should have thought about that a bit more). Not sure if the Action Replay is supposed to work on a real C128. If it does, I should look into that. But if it doesn't on a real C128, I consider this "works as intended" at the moment.

I had c128 and Action Replay back then, I think it was version 5 but I cannot remember for sure. Cartridge did work, and any time it was installed computer started directly to c64 mode. I suppose it did detect that cardridge was meant for c64?

Chol
Posts: 19
Joined: Sun May 24, 2020 8:24 pm
Has thanked: 2 times
Been thanked: 5 times

Re: Transfering Commodore 128 Core

Unread post by Chol »

Isn't it possible to structure both projects in a way that the 128 core can include the 64 core as a git submodule?

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

I think it's important to define what 'compatible' is. There are basically three areas where the C128 differed:

  • The one byte of 'leak through' memory
  • Four I/O addresses that aren't mirrored
  • Two writable I/O addresses that aren't normally on a C64

The 'compatibility' issues with the C128, such as they are, were largely around hardware and cartridges...NOT software, and thus of little to no relevance here. What matters in this case is software compatibility - and I may be mistaken, but as far as I know, the only C64 title with issues on the C128 is Frantic Freddie, which manages to have no sound because the developers chose to write to a mirror address for the SID versus the main one.

Now the small number of features from the C64 core that had to be disabled (which I'd forgotten, as I never use them, like turbo mode) are unfortunate...but the idea of starting over again on a C128 core from scratch as Sorg seemed to be suggesting is entirely preposterous. If there's concern about the now-'missing' features, I'd argue that time is FAR better spent fixing the few remaining problems than anything.

eriks5, asking out of pure ignorance - when you enable 'pure' C64 mode, is there no means to dynamically disable the areas of concern on the C128 to make it fully truly compatible?

eriks5
Core Developer
Posts: 79
Joined: Sat May 21, 2022 11:51 am
Has thanked: 38 times
Been thanked: 182 times
Contact:

Re: Transfering Commodore 128 Core

Unread post by eriks5 »

rhester72 wrote: Sat Feb 25, 2023 1:33 pm
  • The one byte of 'leak through' memory
  • Four I/O addresses that aren't mirrored
  • Two writable I/O addresses that aren't normally on a C64

This is just wrong, there are much more differences. I'm not sure what your point is anyway?

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

eriks5 wrote: Sat Feb 25, 2023 2:15 pm

This is just wrong, there are much more differences. I'm not sure what your point is anyway?

That outside a lack of mirrored I/O spaces, there's nothing about the 'incompatibilities' of the 128 that affect software, which is rather the point of the entire argument.

R4M
Posts: 32
Joined: Wed May 27, 2020 2:27 pm
Has thanked: 2 times
Been thanked: 9 times

Re: Transfering Commodore 128 Core

Unread post by R4M »

The action replay crt does indeed work. The C128 core started in C64 mode automatically whilst I had the display on 80 column mode... hence I thought it crashed when indeed it was working as intended. Sorry, stupid beginners mistake.

User avatar
ericgus09
Posts: 206
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: Transfering Commodore 128 Core

Unread post by ericgus09 »

R4M wrote: Sat Feb 25, 2023 6:19 pm

The action replay crt does indeed work. The C128 core started in C64 mode automatically whilst I had the display on 80 column mode... hence I thought it crashed when indeed it was working as intended. Sorry, stupid beginners mistake.

Now you mention this, I recall leaving my ActionReply cart permanently in my C128 as I typically used the 64 mode more and only removed it when I needed something C128 specific.. so yes this makes perfect sense.

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

Not to get too far afield, but one thing I'd love to see support for somehow (I don't think there's any sort of VICE header for it) is multi-mode cartridges like the MACH 128, that were more or less a 128 cartridge ROM and a 64 cartridge ROM glued together so that each booted in the appropriate mode by maligning the 128 cartridge type detection routine.

lroby74
Posts: 111
Joined: Tue May 26, 2020 2:59 pm
Has thanked: 127 times
Been thanked: 15 times

Re: Transfering Commodore 128 Core

Unread post by lroby74 »

Sorgelig wrote: Fri Feb 24, 2023 4:42 pm

There is one think i don't really like and i'm not sure what to do: Now we have C64 and C128 cores where later one is basically absorbed the whole C64.
While C64 is iconic computer, C128 is niche one. So giving up C64 core into favour of C128 is wrong by all means. It would be better to have/continue C64 core with extra C128 functionality.

Please keep both C64 and C128 cores, on real machines, C128 is not really 100% compatible with C64 games because presence of MMU and other things so i think it would better to have 2 different cores.

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

lroby74 wrote: Tue Feb 28, 2023 7:51 am

Please keep both C64 and C128 cores, on real machines, C128 is not really 100% compatible with C64 games because presence of MMU and other things so i think it would better to have 2 different cores.

Could you provide a single instance of a piece of C64 software that does not run properly on the C128 due to the MMU?

virtuali
Posts: 85
Joined: Mon Feb 01, 2021 10:41 pm
Has thanked: 2 times
Been thanked: 17 times

Re: Transfering Commodore 128 Core

Unread post by virtuali »

rhester72 wrote: Tue Feb 28, 2023 1:04 pm

Could you provide a single instance of a piece of C64 software that does not run properly on the C128 due to the MMU?

A quick search resulted in these:

Rescue on Fractalus
Masters of the Universe
Frantic Freddie ( no music )
Scrolls of Abadon ( graphic issues )
Hawkeye

However, they all refer to real C128s, using Mister cores might not be the same. In VICE x128, for example, there are more C64 games or demos that are not working, even if they do on a real C128.

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

Not one of them is a result of the MMU. Frantic Freddie was a result of poor programming that addressed an undocumented mirror I/O address for the SID, which was such a blunder they released Frantic Freddie 2 in response. Pretty surprised to see Fractalus on the list as I'm sure I played the hell out of it on a 128. I'll look into the others.

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

Re: Transfering Commodore 128 Core

Unread post by rhester72 »

It's worth noting the Fractalus box explicitly states C128 compatibility right on it:

https://www.gamesdatabase.org/Media/SYS ... vision.jpg

Have you actually tested any of these claims, or are you going off a Google search?

virtuali
Posts: 85
Joined: Mon Feb 01, 2021 10:41 pm
Has thanked: 2 times
Been thanked: 17 times

Re: Transfering Commodore 128 Core

Unread post by virtuali »

Chilli_Vibes wrote: Tue Feb 28, 2023 2:15 pm

Keep the C64 core, and ditch the C128 core.

This is wrong on so many accounts, that makes me wonder if you got the point of Mister at all.

There are systems FAR more obscure and unknown that have their own core, so why we should "ditch" a fairly popular and interesting system like the C128 with unique features like a more advanced Basic, a 2nd Z80 for CP/M, a dual display with 80 columns mode, JUST because back in the day most users just play C64 games ?

Mister shouldn't be about "playing the most popular games", but rather preserve systems in a more accurate way than emulation.

Post Reply