Driver:c128d

From MAMEDEV Wiki
Revision as of 22:22, 21 February 2023 by Walker (talk | contribs) (save)

Commodore c128 and c128d devices

This page explains working with the MAME emulation of the Commodore 128 and the desktop verion 128d (MAME devices c128 and c128d) - for which this page was started, but both are identical except for the minor difference of the internal drive in the desktop version

* Short excerp from C64-Wiki

Commodore 128
Commodore 128
Commodore 128d with orignal package box
Commodore 128d with orignal package box

The C128D is a C128 but with an integrated power supply and 1571 disk (DOS 3.1) housed in a sheet-metal case and with an external keyboard. It features C64 / 128 KERNALs on a 32 Kbyte ROM and has 64 Kbytes of V-RAM.

It has three modes:

  1. C128 mode with BASIC 7.0 (default on power up)
  2. C64 mode with BASIC 2 (activated by typing GO64 or by resetting with the C= {Std Mame Layout ALT-Key} 'key depressed)
  3. CP/M mode with CP/M 3.0+ (after booting from CP/M system diskette)

Some Short Notes for running the Commodore 128d in Mame

MAME emulates both an 80 column display and the common 40 column display, due to the fact that the c128d was capable of running a dual monitor setup MAME will boot the system with both monitors online

Everything written here can be applied to the c128 device in MAME as well, as these machines are practically the same hardware (except for differences in revisions) plus the internal disk drive on the desktop version

Requirements (fFirmware roms)

Before you can start up the c128d emulation you ill have to make sure that the required firmware roms ar reachable in the rompath searched by MAME (to be configured in mame.ini)

To see qhich roms and their checksums you need you can execute the command


mame c128d -listroms
ROMs required for driver "c128d" (including device "c1571").
Name                                   Size Checksum
251913-01.u32                         16384 CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88)
318018-02.u33                         16384 CRC(2ee6e2fa) SHA1(60e1491e1d5782e3cf109f518eb73427609badc6)
318019-02.u34                         16384 CRC(d551fce0) SHA1(4d223883e866645328f86a904b221464682edc4f)
318020-03.u35                         16384 CRC(1e94bb02) SHA1(e80ffbafae068cc0e42698ec5c5c39af46ac612a)
318018-04.u33                         16384 CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441)
318019-04.u34                         16384 CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0)
318020-05.u35                         16384 CRC(ba456b8e) SHA1(ceb6e1a1bf7e08eb9cbc651afa29e26adccf38ab)
318018-04.u33                         16384 CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441)
318019-04.u34                         16384 CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0)
jiffydos c128.u35                     16384 CRC(4b7964de) SHA1(7d1898f32beae4b2ae610d469ce578a588efaa7c)
318018-04.u33                         16384 CRC(9f9c355b) SHA1(d53a7884404f7d18ebd60dd3080c8f8d71067441)
318019-04.u34                         16384 CRC(6e2c91a7) SHA1(c4fb4a714e48a7bf6c28659de0302183a0e0d6c0)
quicksilver128.u35                    16384 CRC(c2e74338) SHA1(916cdcc62eb631073aa7f096815dcf33b3229ca8)
390059-01.u18                          8192 CRC(6aaaafe6) SHA1(29ed066d513f2d5c09ff26d9166ba23c2afb2b3f)
8721r3.u11                             3208 BAD CRC(154db186) SHA1(ccadcdb1db3b62c51dc4ce60fe6f96831586d297) BAD_DUMP
310654-03.u2                          32768 CRC(3889b8b8) SHA1(e649ef4419d65829d2afd65e07d31f3ce147d6eb)
310654-05.u2                          32768 CRC(5755bae3) SHA1(f1be619c106641a685f6609e4d43d6fc9eac1e70)
jiffydos 1571.u2                      32768 CRC(fe6cac6d) SHA1(d4b79b60cf1eaa399d0932200eb7811e00455249)

For the c128d you will need the firmware for the c128, and the floppy c1571 (as noted in the listing above), PAL Firmware ishould be in c128p, but the eumulation may load parts of the rom inside the ntsc set as well (chracter rom for example does not differ and is shared)

For your convenience you can get the needed Firmware files here (all available revisions and language deviations included).

Firmware C128 NTSC

Firmware C128 PAL

Firmware C1571 Floppy

Firmware C1571CR Floppy

Basic MAME keyboard shortcuts for C128d

Useful Keyboard Shortcuts

Link to MAME default Keyboard Layout

While using MAME it is always good to have these ready, note that inside the emulation the keys are not recognised by Mame unless you enable UI mode (default key <Scroll Lk> )!

Keyboard Shortcuts (There are plenty more, read the docs)
Key Description (UI enabled Mode!)
<Scroll Lock> Switch UI enabled/disabled
<ESC> Exit Mame
<F3> Soft Reset
<TAB> Open/Close Mame Menu
P Pause Emulation
Key Description (UI disabled Mode!)
<ALT> <C=>
<F6> <TAB>
<F11> 40/80 Display

Start the 128d in MAME with command line

For NTSC version start with mame c128d and for the pal version you use mame c128dp

Dual Screen (40 and 80 column displays at the same time)

MAME will bring up the system, the default MAME configuration has both available screens activated at the first boot without addidtinall parameters:

CAUTION: MAME Home Computer emulation always starts in GUI disabled mode - all keyboard inputs are managed by the emulated system - as such there is no possibility to exit the emulation in this mode until you switch to UI enabled Mode'#Useful Keyboard Shortcuts

c128 and c128d after powerup in default MAME configuration

Single Screen (40 Column display)

As a historic sidenote I should menttion that the most common configuration the owners started with in the 80's was a single screen setup, since pc monitors were kind of expensive at that time. To start the machine in MAME with the single 40 column Screen that was most often used, you start mame with mame c128d -view "Screen 1 Standard" c128 and c128d in 40 Column Single Monitor Setup

To get a list of all variants, you enter mame c128 -listclones

As of MAME 0.251 the current list of clones available is

mame c128 -listclones
Name:            Clone of:
c128_de          c128
c128_se          c128
c128cr           c128
c128d            c128
c128d81          c128
c128dcr          c128
c128dcr_de       c128
c128dcr_se       c128
c128dcrp         c128
c128dp           c128

Confirmed not working (MAME 0.251)

Currently I am trying to gather a listing about what works in Mame, and what is bugged right now, this list will grow continually

C64 Tapes (/probably never worked?)

Everything from the C64 Softwarelist Cassette Source is broken right now, The MAME c64 Device can run those without problem, but the c128 devices are all broken in this regard right now!

Note: While the tape versions on the c128 Device in MAME iscurrently not working, most programs/games have a "cracked" disk version available somewhere on the net - Most often these versions can be run instead of the tape version and will work on MAME c128(d) devices - BUT rtake note that the c128 emulation is noat as far in refinement as the c64 emulation in MAME is - so if you are hard pressed to play a c64 game, at the moment you should use the c64 emulation for it, the c128 emulation in c64 mode tends to show a lot of artifacts while the c64 MAME device manages to emulates it fine

Note2:Just to be safe I also tested the tapes with the vice emulator - and they definitely load and start there like it should be. (From my experience while most c64 games do work on the real hardware, not all did!)

C128 Disk

C128 Disks (Softwarelist)'
Program/Game Marked as working? Notes
Beyond Zork:TheCoconut of Quendor (R47) Yes Beyond Zork 128 Floppy Disk 1 Boot Error Message Same Disk Set works in VICE
GEOS 128 v2.0 Yes GEOS 128 v2.0 Boot Error Message Same disk set works in VICE
The Last V-8 Yes The disk can be read and the game can be started, but after the first screen the game stops working in MAME. Test in VICE with the same disk worked flawless
Elite 128 Not in softwarelist The Disk directory (LOAD"$",8) cannot be read in MAME c128. The Same Disk can be read in VICE and the game can be loaded and started without problems there. NOTE: This Game has to be started in C64 Mode despite being a C128 Game NOTE2: Link to test disk Elite 128 Disk Archive
Tetris 128 Not in softwarelist The disk directory loads fine and the game can be started, but stops immediately with a problem ?device not present (referencing a line in the basic code that executes a bload command). The same Disk can be read in VICE and the game can be loaded and started without problems there. NOTE: PM if you need a test specimen) NOTE2: Afte running the game once, the emulation state is broken and does not recover with resets - the disk remains unreadable until mame is closed and the emulation fully restarted.
The Rocky Horrow Picture Show 128 Yes but this version definitely seems to be broken as it fails in other emulators The Disk from Softwarelist can be loaded, and the game starts loading (binary gibberish visble) but then it shows a broken boot message on the 80 column screen and stays in an infinite loading loop it seems. On Vice it shows nothing on the 80 column screen but also fails to load with the version from the software list. Using a cracked image (not in softlist The Rocky Horror Picture Show 128 meanwhile works ok in MAME (some audio artifacts and some broken sprites) but playable and very well in Vice.

Confirmed working (MAME 0.251)

C128 Disk

Report in the order of the xml

Name Softtlist Name Disk Count Boot Disk? Tested version State if broken works in Vice?
A Mind Forever Voyaging (R77) amfv 2 yes MAME 0.251 OK
Beyond Zork: The Coconut of Quendor (R47) byondzrk 2 yes MAME 0.251 broken yes
Bureaucracy: A Paranoid Fantasy (R116) bureaucr 2 yes MAME 0.251 OK
Bureaucracy: A Paranoid Fantasy (R86) bureaucra 2 yes MAME 0.251 OK
The Last V-8 lastv8 1 no MAME 0.251 broken yes
Thai Boxing thaibxng 1 yes MAME 0.251 broken no (prob prot?)
High Voltage SID Collection 10 Years 1996-2006 10yrhvsc 1 no MAME 0.251 broken no
BASIC-128 v1.03 basic128 1 yes MAME 0.251 OK
  • CPM 3.0
    • Jokes on me, I go through the full list now and will take notes here,will update the softlist data when finished.

    Ok jokes aside; I won't list everyhing here from the softwarelist that is marked as working anyway - like for example the infocom 80 column screen Text Adventures.

    Generic Notes

    As someone else pointed out to me, the main work is being done on the C64 Device, so you will notice in comparison that the C64 in MAME is already quite cycle correct even for demos and other hardware intensive use cases.

    Many Games/Demos/Intros will flicker and show visual artifacts when run on the MAME c128 device, while they will run nearly flawless like on the original with the MAME C64 emulation.

    Tools

    Nibtools (Tool to comvert between several relevant c64/c128 disk formats


    Documentation

    Archive Link to History of Commodore 128 Page

    C128 Programming Reference

    Service Manuals

    a big collection of manuals c64 and c128 related

    Commodore 128 CPM Mode Kapitel 7 - Deutsche Ausgabe

    References

    C128 on old-computers.com

    c128 on oldcomputers.net

    128d on C64-wiki.com