Commodore 128 for the MiSTer?

Bas
Top Contributor
Posts: 518
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 60 times
Been thanked: 225 times

Re: Commodore 128 for the MiSTer?

Unread post by Bas »

A fully functional C128 would be the grand finale of 8-bit home computers, but it's a complicated beast so I'm not holding my breath.
EeDee
Posts: 238
Joined: Thu Dec 24, 2020 12:33 pm
Has thanked: 7 times
Been thanked: 47 times

Re: Commodore 128 for the MiSTer?

Unread post by EeDee »

tomxp411 wrote: Fri Jul 17, 2020 5:02 pm
Sorgelig wrote: Fri Jul 17, 2020 5:53 am
tomxp411 wrote: Fri Jul 17, 2020 5:00 am

It's not THAT different. The CPUs don't run at the same time, and the Z80 is dead stock. The MSX core and ZX core both have good Z80 implementations.

The 8502 is a slightly different chip than the 6510 used in the C64, but the differences are well known and shouldn't be challenging. The VIC chip has some differences as well, to support the extra keyboard pins and to handle the clock divider (allowing the CPU to run at 2MHz, rather than 1MHz.)

I believe the only whole, new chip is the MMU... but that's well enough known that it should be possible to implement a new one to the same specification.
no one will stop you from implementing this.
Heh, no. If I did tackle a system, it would be to build the Altair 8800 into something actually usable.
That would be nice! :-)
User avatar
tontonkaloun
Posts: 354
Joined: Sun May 24, 2020 7:38 pm
Has thanked: 152 times
Been thanked: 51 times

Re: Commodore 128 for the MiSTer?

Unread post by tontonkaloun »

Lodovik wrote: Tue May 18, 2021 12:15 am Yeah, a C128 core would be nice. The C128 was my second computer, after the C64 so it would be mainly for nostalgia as I used my 128 mostly in 64 mode. I suspect that it’s the case for most 128 users so there’s no strong incentive to develop the core. But the 128 had a couple of good features like a much enhanced BASIC and 80 column display. Geos 128 was also a strong point. I regret having sold my 128 and I miss it more than my 64.

I would be ready to make a small donation to have this core. If enough of us can do the same, maybe a dev could be interested to start working on it.
Hello,

I would also be willing to support such a project
User avatar
kathleen
Top Contributor
Posts: 409
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 224 times
Been thanked: 131 times

Re: Commodore 128 for the MiSTer?

Unread post by kathleen »

Me as well,
And despite Sorg is right by saying that in case of the C128 core will be there, the 1st command that most of the people will type will be GO64, for me it won't be the case, the C128 has the CP/M, some nice utilities and some dedicated games that I'd like to see on the Mister. And as Bas said above, it would be the grand final of 8 Bit computers and will close the existing gap in the Commodore cores.

かすりん

akeley
Top Contributor
Posts: 1303
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 416 times
Been thanked: 399 times

Re: Commodore 128 for the MiSTer?

Unread post by akeley »

C128 would be very nice, but for me definitely not a "grand finale". Many 8-bit cores still lack some important functionality, eg: write to floppy in Apple II (as per this thread: viewtopic.php?f=29&t=2859).
virtuali
Posts: 100
Joined: Mon Feb 01, 2021 10:41 pm
Has thanked: 2 times
Been thanked: 24 times

Re: Commodore 128 for the MiSTer?

Unread post by virtuali »

kathleen wrote: Wed Sep 22, 2021 6:34 pmdespite Sorg is right by saying that in case of the C128 core will be there, the 1st command that most of the people will type will be GO64
GO64 was usually the most used command back in the day, because if you had a real C128, you were using as a C64 most of the time to play games. That wouldn't be needed here, since there's a perfectly fine C64 core to be used instead.

Yes, the C128 is a very complex machine because you had:

- C128 mode in 40 columns, running Basic 7.0 with 8502 + 8564 VIC, running at 1Mhz
- C128 mode in 80 columns, running Basic 7.0 with 8502 + 8563 VDC and VIC disabled, running at 2Mhz
- CP/M mode in 40 columns, with Z80 + VIC, running at 2Mhz, 8502 used for some I/O
- CP/M mode in 80 columns, with Z80 + VDC, running at 2Mhz, 8502 used for some I/O
- C64 mode with 8502 + VIC, running at 1Mhz

And it was possible to switch between 40/80 columns mode on the fly, provided you had both composite and RGB connected. And if wasn't enough, the 1571 disk drive supported both GCR (standard Commodore) or MFM (CP/M or PC)

Quite tricky system, but also, very interesting. No idea if it's too complex for the MiSTer hardware, but surely would be very complex to create.
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: Commodore 128 for the MiSTer?

Unread post by rhester72 »

Not to get too off-forum, but if you don't want to wait, BMC64 includes a VERY good C128 emulator (straight from VICE) that even includes PIP for 40/80 column modes if desired. It'll do pretty much anything you throw at it with near-zero latency. Mine's in a proper C64c case with real keyboard and honestly the C64 emulation is superior to MiSTer, particularly in the display department (where I just invested a crazy amount of time tuning the custom video modes for 100% accuracy to original Commodore signalling).

If you've never seen it before, might want to check it out...I've never seen anything that could beat it for the 128.
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Commodore 128 for the MiSTer?

Unread post by cathrynmataga »

In a way, seems to me, the C128 with it's Z80 and 6502 both would be exactly the kind of thing Mister is good at, that's a pain to sychronize with threads in software. But maybe doesn't even matter, if nothing depends on this. What did people use C128s for? I guess the 80 column would have been nice for calling into BBSs? Seems a lot of time those days went into 'managing pirate videogame collections' -- did anyone do this in 80-column C128 mode.
Bas
Top Contributor
Posts: 518
Joined: Fri Jan 22, 2021 4:36 pm
Has thanked: 60 times
Been thanked: 225 times

Re: Commodore 128 for the MiSTer?

Unread post by Bas »

80-column would be used for productivity software like things running unde CP/M.
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Commodore 128 for the MiSTer?

Unread post by cathrynmataga »

Everyone knows that, but on C128, exactly what programs did anyone actually run on this system? (I might try myself on emulator.)

For me, I think retro-word processing is actually okay, for anything small. 8-bit era spreadsheets might still be useful. I wouldn't want to do my taxes or keep my books on an -bit PC though. I don't know if there's much of a 'retro-productivity' community, really.
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: Commodore 128 for the MiSTer?

Unread post by rhester72 »

I literally lived in GEOS 128 (on VDC) for about 2 years - I'd never have made it through high school research papers and the like without it.

80-column BBSing was indeed very nice as well, as were 80-column Infocom games. There were a few (VERY few) games that took advantage of 2MHz when available (like Uridium Plus), but ironically that was something I learned only long after the system was an afterthought for most people.

The keyboard was SUPER nice, for sure. =) Having true burst mode access to drives (especially on the 1581) was also a joy after so many years of abysmally slow drives (JiffyDOS was a toy for the rich at the time, but Epyx Fast Load was a decent-ish substitute for the lot of us). Having a built-in function ROM like The Servant (my personal favorite) was also INCREDIBLY handy.

These days, to be honest, the 128 side of the house is more of a novelty for me than anything. I never quite finished playing with CP/M, so I've been doing some of that. I've also spent some time learning the FAR more powerful BASIC on the 128 - man, it could do a LOT!

The truth of the matter is like the C65, the C128 was just too much, too late. The world had moved on and it just no longer had a place. But it still reigns supreme in my mind as the ULTIMATE 8-bit!
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Commodore 128 for the MiSTer?

Unread post by cathrynmataga »

Oh yeah, GEOS 128, I was only on C64 for games, so never really used the computer for anything else. The keyboard and native floppy disk write speed on C64 was just so dodgy, I was mostly using atari 8bit for editing, things like this, until I went to PC/ST. I sort of appreciate the tinkering as much as the games, myself, and though the world won't come to a halt without Mister C128, I'd goof with it if it came out for sure. Emulation is such a huge amount of work relative to the rewarsd, it requires someone with C128 passion to dig into this, I think. And this one, not sexy either, like Saturn or PS1.

These days I find retro-BBSing more entertaining than retro-word processing/spread-sheeting, tbh. Was it possible to connect to BBS from CPM/80 column on the C128? Did CPM have access to the modems also? Was there a GEOS native terminal emulator?
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: Commodore 128 for the MiSTer?

Unread post by rhester72 »

I don't know anyone that ever did anything with a modem in CP/M...I'm honestly not sure if it would have been possible or not. (Given the complexities of the user port, I'm leaning towards 'not'.)

There was certainly GeoTerm for GEOS, though - but it wasn't very feature-rich or performant, it seemed to me that it was to put a checkbox in the "GEOS has a terminal' box.
virtuali
Posts: 100
Joined: Mon Feb 01, 2021 10:41 pm
Has thanked: 2 times
Been thanked: 24 times

Re: Commodore 128 for the MiSTer?

Unread post by virtuali »

There was plenty of terminal software running in native 128 mode, many supporting 80 columns too:

https://commodore.software/downloads/ca ... l-programs

No idea if it was ever possible to go online from CP/M mode. Could be the Z80 which was normally used in C128 mode to handle some I/O (not sure about the User Port), can't do it in CP/M mode because...it's running CP/M instead ?
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Commodore 128 for the MiSTer?

Unread post by mparson »

virtuali wrote: Mon Sep 27, 2021 9:29 pm There was plenty of terminal software running in native 128 mode, many supporting 80 columns too:

https://commodore.software/downloads/ca ... l-programs

No idea if it was ever possible to go online from CP/M mode. Could be the Z80 which was normally used in C128 mode to handle some I/O (not sure about the User Port), can't do it in CP/M mode because...it's running CP/M instead ?
It's been a LONG time since I had my 128 up and running, but I do remember trying out some terminal programs uner CP/M. From what I remember, it could handle 1200 baud OK, but struggled with 2400 baud. At the time, I had a CMD Swiftlink and a 14.4k modem, so, I was able to go full-speed in native 128 mode. I don't think I was able to make use of the SL under CP/M, probably had to use my old Aprotek 2400 baud modem.
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: Commodore 128 for the MiSTer?

Unread post by rhester72 »

Both the 64 and 128 could definitely handle 2400 baud, at least with an Aprotek Minimodem.
mparson
Posts: 20
Joined: Fri Jul 31, 2020 4:46 pm
Been thanked: 5 times

Re: Commodore 128 for the MiSTer?

Unread post by mparson »

rhester72 wrote: Fri Dec 17, 2021 5:31 pm Both the 64 and 128 could definitely handle 2400 baud, at least with an Aprotek Minimodem.
Yes, and in native 128 mode, it handled 2400 just fine. With the Swiftlink cart, I was able to do 14.4k. When combined with a cart-port multiplexer, I was able to use the Swiftlink and an REU at the same time and use the REU as a RAM disk and even download things at the full speed my modem could deliver.

My memory is that the 128 in CP/M mode did not handle speeds over 1200 baud very well though.
eriks5
Core Developer
Posts: 79
Joined: Sat May 21, 2022 11:51 am
Has thanked: 38 times
Been thanked: 182 times
Contact:

Re: Commodore 128 for the MiSTer?

Unread post by eriks5 »

I recently got myself a DE10 nano and saw there was no C128 core, so I figured this is a nice little project to get back into FPGA programming :D

The C128 was my second computer back in the eighties - traded in my C64 for it - and I loved it, and still do. I still have it, and though it needed some repairs over the years it's still functioning. But I'm always afraid to turn it on, as it might just die some day.

So, I dove in schematics, Programmer's reference guide, and even some books I still had from over 35 years ago, in an attempt to create a C128 core, and here it is. Forked from the C64 MiSTer core since the 128 is essentially a C64 with some extra chips hacked in. Not a 100% complete C128 implementation (yet), but some programs already work.

C128 features implemented
  • MMU fully implemented and tested. Configurable for 128K or 256K of system memory.
  • VDC partially implemented: memory interface is, video output is not.
  • Z80 implemented. Simple uses work, but CP/M does not yet boot.
  • C64 mode fully operational.
  • Support for C128 specific .CRT and .PRG files.
  • C128DCR or C128 ROMs and hardware differences implemented.
C128 features not (yet) implemented
  • C128 specific keys
  • 80 column display
  • CP/M mode
  • Loading internal function ROM (were there even any ROMs for this?)
  • 1571 drive and fast serial for disk I/O
  • ... probably other stuff I forgot or didn't realize is different from the C64
You can download the core from the repo at: https://github.com/eriks5/C128_MiSTer
The README of the repository has some more information on what is working and what is not.

And here's a short YouTube video showing the current state: https://youtu.be/DoZKi4JNWWs

I will be continuing to work on this. Next thing I want to dive into is implementing the extra keys and the 80 column video output.
User avatar
thera34
Posts: 106
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 76 times
Been thanked: 58 times

Re: Commodore 128 for the MiSTer?

Unread post by thera34 »

Wow, that was unexpected :D Thank you @eriks5 !
AmintaMister
Posts: 277
Joined: Thu Sep 16, 2021 10:54 pm
Has thanked: 720 times
Been thanked: 44 times

Re: Commodore 128 for the MiSTer?

Unread post by AmintaMister »

eriks5 wrote: Sat May 21, 2022 11:59 am I recently got myself a DE10 nano and saw there was no C128 core, so I figured this is a nice little project to get back into FPGA programming :D

The C128 was my second computer back in the eighties - traded in my C64 for it - and I loved it, and still do. I still have it, and though it needed some repairs over the years it's still functioning. But I'm always afraid to turn it on, as it might just die some day.

So, I dove in schematics, Programmer's reference guide, and even some books I still had from over 35 years ago, in an attempt to create a C128 core, and here it is. Forked from the C64 MiSTer core since the 128 is essentially a C64 with some extra chips hacked in. Not a 100% complete C128 implementation (yet), but some programs already work.

C128 features implemented
  • MMU fully implemented and tested. Configurable for 128K or 256K of system memory.
  • VDC partially implemented: memory interface is, video output is not.
  • Z80 implemented. Simple uses work, but CP/M does not yet boot.
  • C64 mode fully operational.
  • Support for C128 specific .CRT and .PRG files.
  • C128DCR or C128 ROMs and hardware differences implemented.
C128 features not (yet) implemented
  • C128 specific keys
  • 80 column display
  • CP/M mode
  • Loading internal function ROM (were there even any ROMs for this?)
  • 1571 drive and fast serial for disk I/O
  • ... probably other stuff I forgot or didn't realize is different from the C64
You can download the core from the repo at: https://github.com/eriks5/C128_MiSTer
The README of the repository has some more information on what is working and what is not.

And here's a short YouTube video showing the current state: https://youtu.be/DoZKi4JNWWs

I will be continuing to work on this. Next thing I want to dive into is implementing the extra keys and the 80 column video output.
AWESOME!

Thanks!!!!
User avatar
NML32
Posts: 288
Joined: Sun May 24, 2020 6:57 pm
Has thanked: 272 times
Been thanked: 43 times

Re: Commodore 128 for the MiSTer?

Unread post by NML32 »

Wow, this is very exciting news!! :)

Thank you @eriks5
rhester72
Top Contributor
Posts: 1107
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 13 times
Been thanked: 169 times

Re: Commodore 128 for the MiSTer?

Unread post by rhester72 »

eriks5 wrote: Sat May 21, 2022 11:59 am Loading internal function ROM (were there even any ROMs for this?)
Yes, absolutely. For ease of testing, The Servant is probably your best bet.

Timing is going to increasingly become a bear the further you go, but I genuinely wish you all the luck in the world with this. I super-genuinely did not think it possible due to the timing issues...I hope to find I was wrong. =)
eriks5
Core Developer
Posts: 79
Joined: Sat May 21, 2022 11:51 am
Has thanked: 38 times
Been thanked: 182 times
Contact:

Re: Commodore 128 for the MiSTer?

Unread post by eriks5 »

Thank you everyone for all the positive reactions so far :)
rhester72 wrote: Sat May 21, 2022 2:34 pm
eriks5 wrote: Sat May 21, 2022 11:59 am Loading internal function ROM (were there even any ROMs for this?)
Yes, absolutely. For ease of testing, The Servant is probably your best bet.
Thanks, I'll look into that. The issue right now is that this core needs a lot of RAM cells in the FPGA, with 64k VDC RAM and a total of 128K for all the Basic and Kernal ROMs. And then there's the character rom and drive roms too. So the function ROM is going to have to live in the SDRAM I suppose.
rhester72 wrote: Sat May 21, 2022 2:34 pm Timing is going to increasingly become a bear the further you go, but I genuinely wish you all the luck in the world with this. I super-genuinely did not think it possible due to the timing issues...I hope to find I was wrong. =)
Z80 timing looks about right at the moment, although there is still some weirdness during VIC-II badlines. VDC timing is pretty much an unknown, I might cheat there and use dual port RAM for now :) My current goal is getting things working for non-timing critical programs, and worry about cycle perfectness later.
Alynna
Posts: 67
Joined: Sat May 21, 2022 4:08 pm
Has thanked: 1 time
Been thanked: 77 times

Re: Commodore 128 for the MiSTer?

Unread post by Alynna »

So if this is actually being worked on I'd like to help. I know the Commodore computers inside and out.
akeley
Top Contributor
Posts: 1303
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 416 times
Been thanked: 399 times

Re: Commodore 128 for the MiSTer?

Unread post by akeley »

Wonderful stuff. Extra bonus points for having working 15kHz support from the get go ;)
User avatar
tontonkaloun
Posts: 354
Joined: Sun May 24, 2020 7:38 pm
Has thanked: 152 times
Been thanked: 51 times

Re: Commodore 128 for the MiSTer?

Unread post by tontonkaloun »

eriks5 wrote: Sat May 21, 2022 11:59 am I recently got myself a DE10 nano and saw there was no C128 core, so I figured this is a nice little project to get back into FPGA programming :D

The C128 was my second computer back in the eighties - traded in my C64 for it - and I loved it, and still do. I still have it, and though it needed some repairs over the years it's still functioning. But I'm always afraid to turn it on, as it might just die some day.

So, I dove in schematics, Programmer's reference guide, and even some books I still had from over 35 years ago, in an attempt to create a C128 core, and here it is. Forked from the C64 MiSTer core since the 128 is essentially a C64 with some extra chips hacked in. Not a 100% complete C128 implementation (yet), but some programs already work.

C128 features implemented
  • MMU fully implemented and tested. Configurable for 128K or 256K of system memory.
  • VDC partially implemented: memory interface is, video output is not.
  • Z80 implemented. Simple uses work, but CP/M does not yet boot.
  • C64 mode fully operational.
  • Support for C128 specific .CRT and .PRG files.
  • C128DCR or C128 ROMs and hardware differences implemented.
C128 features not (yet) implemented
  • C128 specific keys
  • 80 column display
  • CP/M mode
  • Loading internal function ROM (were there even any ROMs for this?)
  • 1571 drive and fast serial for disk I/O
  • ... probably other stuff I forgot or didn't realize is different from the C64
You can download the core from the repo at: https://github.com/eriks5/C128_MiSTer
The README of the repository has some more information on what is working and what is not.

And here's a short YouTube video showing the current state: https://youtu.be/DoZKi4JNWWs

I will be continuing to work on this. Next thing I want to dive into is implementing the extra keys and the 80 column video output.
A huge thank you!!
This is the core I was waiting for
:P :P :P
User avatar
wark91
Core Developer
Posts: 334
Joined: Sun May 24, 2020 8:34 pm
Has thanked: 447 times
Been thanked: 94 times

Re: Commodore 128 for the MiSTer?

Unread post by wark91 »

Thank you for your work !!!
breiztiger
Top Contributor
Posts: 427
Joined: Sun May 24, 2020 7:17 pm
Has thanked: 23 times
Been thanked: 93 times

Re: Commodore 128 for the MiSTer?

Unread post by breiztiger »

thank you for this core !!!
CPC-Power Staff
User avatar
Reed_Solomon
Posts: 65
Joined: Sun May 24, 2020 7:37 pm
Has thanked: 40 times
Been thanked: 8 times

Re: Commodore 128 for the MiSTer?

Unread post by Reed_Solomon »

Great news. Thanks for working on this!
User avatar
kathleen
Top Contributor
Posts: 409
Joined: Fri Jun 26, 2020 4:23 am
Location: Belgium
Has thanked: 224 times
Been thanked: 131 times

Re: Commodore 128 for the MiSTer?

Unread post by kathleen »

Thank you @eriks5, this is a great news that I was waiting for since a while.
The C128 has more than its place here.

かすりん

Post Reply