Pixel exact emulation of the Commodore 128,Commodore 64, Spectrum 48/128K,VIC 20 and Atari 2600 

Z64K should run on any platform with an updated java runtime environment installed. I will update this site when I get some free time but in the mean time feel free to drop me a message via the contact page with feedback or questions. The changelog only includes changes not shown on this homepage.


*tip: ALT-ENTER togglesfullscreen mode

***JAVA 9, 10 and 11 users should use the -Dsun.java2d.uiScale=1.0 option if the screen does not render nicely on your setup.  See https://bugs.openjdk.java.net/browse/JDK-8189416***

LINUX users: You might need to change the permission of Z64K.jar to allow execution. e.g. chmod +x Z64K.jar. 

Requires JRE 8 or better. For latest features use this version.*
* last updated 30 November 2024

Z64K.jar Z64K.jar
Size : 2123.073 Kb
Type : jar
commandline.txt commandline.txt
Size : 2.583 Kb
Type : txt
changelog.doc changelog.doc
Size : 1104.5 Kb
Type : doc
z64k_quick_guide.txt z64k_quick_guide.txt
Size : 6.989 Kb
Type : txt

Keyboard shortcuts

  • ALT+O = Toggle output of VICIIe/VDC to main screen (C128 only)
  • ALT+2 = Toggle 2nd display ON/OFF (C128 only)
  • ALT+ENTER = Toggle Fullscreen mode
  • ALT+INSERT = Paste text from clipboard
  • ALT+DELETE = Copy screen text to clipboard
  • ALT+Q = Toggle capture mouse (C128 & C64)
  • ALT+R = Soft reset
  • CTRL+ALT+R = Hard reset
  • ALT+W = Toggle Warp mode

AdditionalC128 keys

F1=ESC
F2=TAB
F3=ALT
F4=CAPS LOCK
F5= HELP
F6=LINE FEED
F7=40/80 DISPLAY
F8=NO SCROLL

The following keymappings override the values in the keyboard configuration editor for the C128
F9 = F1/F2
F10= F3/F4
F11= F5/F6
F12=F7/F8

Other changes are:-
PC CAPS LOCK = C128 SHIFT LOCK
For emulated NUMPAD Joystick Num Lock needs to be OFF.
C128 NUMPAD keys works with Num Lock ON.


There is an option to enable/disable extra c128 keys via settings==>setup==>Extended Keyboard keys in the latest downloadable version of the emulator. Default is enable extended keyboard keys in C128/CPM modes only.

The C128 Direction keys are mapped to PC cursor keys, and CRSR U/D and CRSR L/R mapped to PC NUMPAD / and * when Extended Keyboard keys enabled.

Version 2 - http://www.z64k.com/resources/version2/Z64K.jar

2024

30 November

  • Fixed -go64 command line option

30 September

  • Swapped reset order of C128 MMU and RAM. Fixes clearing of RAM afterhard reset.

27 March

  • series of Z80 EI instructions cannot be interrupted, 

2 February

30 January

29 January

  • Minor timing fix for C128 writing to Z80 port. Stableses lines and confirmed they match real hardware for z80rastertimingtest.prg as discussed at https://sourceforge.net/p/vice-emu/bugs/1979/

2023

26 November

  • Enable tape record for VIC 20

17 June

  • C128 machine monitor io d500 will always dump MMU state regardless if it's mapped into IO or not
  • Fixed timing with diskSYNC. Eagle soft version of skate or die loads correctly again.

22 May

  • Save C128 extra MMU ram and c128 keyboard state. 

30 April

  • Adjusted CIA TOD power counter behavior when toggling TODIN. VICE test repository HSYNC6 passes.

14 April

  • Ensure Z80 port RW synchronized with 1mhz clock.

13 April

  • Improved 40 column z80 timing without breaking anything. :)

12 April

  • Fix bug introduced in last release that affected some CP/M software from loading in 40 column mode.

11 April

  • C128 z80 respects VICII DMA cycles. See https://c-128.freeforums.net/post/7215/thread

28 March

  • Screenshots for testbench always uses simple rendering for screenshots. (Deinterlacing set to None)
  • DMA delay affects idle byte as discussed in VICE bug #1855

26 March

  • Set default rendering type via general settings in global settings.

13 March

  • "Randomize" c64 and c128 default color RAM. Sample taken from the uninitialized color RAM block 0on a real C128 at powerup.

12 March

  • Include monitor help text for io command. (text stolen from VICE) :)

11 March

  • Improved CRT performance and emulation.

10 March

  • C128 ASCII/DIN selection persists into C64 mode.

7 March

  • Z80 IN/OUT accesses RAM from $d000-$dfff for locations $0000-$1000 only when RAM bank 0 ismapped in.

  • Fixed bug with monitor when banking in ROMusing bank command for c128

4 March

  • Z80 port accesses the same as memory access for undefined IO ranges.

  • Fixed bug that sometimes caused the incorrect RAM bank being relocated with p0/p1 swap

  • FF0x mmu control available using Z80 IN/OUT commands in c128 mode

28 February

  • Video Immediately syncs to new frequency. c128 demo #1 behaves like real hardware. 

27 February 

  • Color RAM always available in memory locations $1000-$13ff in Z80 c64 mode with memory and port accesses

26 February

  • c128 z80 can access color RAM at locations $d800-$dbff in addition to $1000 to $1400 using port instructions.

25 February

  • Fix bug that would crash the assemble rwhen using indirect JMP

  • Always use color ram bank 1 when in c64 mode

18 February

17 February

  • Remappable zero page and stack page disabled in c64 mode.

16 February

11 February

  • Fixed bug where mouse wheel scrolling could cause emulator to lock up.

22 January

  • Fixed bug that prevented saving of second side of d71 disk images.

2022

10 October

  • Z80 stack pointer set on 0xffff on reset. Fixes a few issues with programs that don't explicitly configure the stack point on startup

9 September

  • Fix bug with Testbench not starting if it hasn't been previouslyconfigured

5 September

  • Minor updates to improve catching of filechooser race conditions that very rarely causes null value error that crashes emulator.
  • Machine monitor peeks IO range for C128 when mapped in.
  • Update MMU to behave like majority of tested C128's where zeropage and stack are both set to the same page.  All mmu tests in VICE test repository pass.
  • Allow mapping in of C128 kernal while in Z80 mode.

17 August

  • Virtual FS scratch command will add .del extension to "deleted" file. When saving new file with same filename as "deleted" file, the "deleted" file will be removed from the host file system.
  • Show read only flag if set when displaying  directory in Virtual FS.
  • Prevent saving of files with invalid host system filename when using Virtual FS.
  • Allow wildcard (* and ?) filters when loading Virtual FS directory.
  • Virtual FS scratch command simulated but does not currently delete any files from host file system.

15 August

  • Select correct drive when loading disk image if Virtual FS is currently selected
  • Disk viewer can be scrolled by mouse wheel.
  • Improved accuracy of clickable disk viewer when scrolled
  • Fix bug when loading file via double clicking disk viewer for device 10 and 11.
  • Double clicking DIR file types in disk viewer will open that directory.
  • Show files in Disk preview for Virtual FS.
  • Adjust calculated file block size s for virtual FS
  • Fix minor bug where Virtual FS CD doesn't work immediately after reset
  • Allow saving of files with Virtual FS.
  • Virtual FS load"*",8 will load the last loaded program.  If no programs have previously been loaded, the first program will be loaded.
  • Fix bug with Virtual FS where JiffyDOS protocol could be incorrectly triggered when byte $61 is received directly after a talk request

14 August

  • Current folder selector for Virtual FS available in drive settings.

13 August

  • Fixed wildcard loading of firstfile with Virtual VS
  • Fixed bug that prevented JiffyDOS command @$ from working with Virtual FS
  • Improved Virtual FS JiffyDOS timing.
  • Implement Virtual FS UI command. C128 "warm resets" drive message on error channel. 
  • Flash LED when error occurs with Virtual FS
  • Improved reliability of Virtual FS JiffyDOS support.  
  • Ordered Virtual FS display of subdirectories and files.

12 August

  • Included Virtual FS CD command
  • Update status of Virtual FS in disk UI
  • Improved Virtual FS error handling

11 August

  • Improved C128 Virtual FS device support
  • Improved Virtual FS device JiffyDOS support
  • load programs with .prg extension without needing to include the .prg in the load command

10 August

  • New Virtual FS device available under drive type settings - Experimental and still a work in progress. Location set to prg path in paths setting.  

3 July

  • Fixed bug that caused emulator to crash on exit with older versions of saved config
  • Include SID Analyzer in version 2 of Z64K.
    F1 = Toggle voice 1 ON/OFF
    F2 = Toggle voice 2 ON/OFF
    F3 = Toggle voice 3 ON/OFF
    F4 = Toggle voice 4 (volume samples) ON/OFF
    F5 = Display waveform
    F6 = Display envelope
    F7 = Display oscillator
    F8 = Display combined
    F9 = Pause (press F5-F8 to un-pause)
    F11 = speed down
    F12 = speed up
  • Decommission version 1 of Z64K.

1 July

  • Improved emulation of single pixel mode when char total horizontal less than 8 pixels .

26 June

  • Implement some odd behaviors of VDC in single pixel mode when char total horizontal less than 8 pixels. 

18 June

  • Mouse can be captured using eitherVDC or VIC screen
  • Double click of mouse toggles full screen

13 June

  • Fixed bug with c1541 and c1571 snapshot component that wasn't saving VIA state correctly.
  • Fixed bug with C128 snapshots that prevented VDC and 2nd 64K RAM bank from saving.

12 June

  • U2+/U64 "enhanced" g71 read support. 
  • Save current ROM configuration on exit.

11 June

  • add ASCII/DIN option for c128 chargen in ROM settings.

8 June

  • Use correct part of c128 chargen ROMin C128 mode.

7 June

  • Bug fix with size of each stored track in g71 header to use LO/HI
  • Assembler updates to add support for equ, dc and ds keywords

4 June

  • Minor fixes to saving and loading of g71 images

2 June

  • Improved IMD disk image support

17 May

  • Loading of 5.25 Imagedisk (.imd) image support.

15 May

  • Fixed bug that wouldn't allow all MFM sectors to load from g71 images
  • Minor update to g71 format to keep header as GCR-1571 for images with MFM tracks
  • Included support to save g64 images
  • Included support to load and save g71 images (includes saving of MFM tracks if they exist). note: preview window for some g71 images might not work.

13 May

  • Fixed bug when load g64 images with half tracks

11 May

  • remove debugging output
  • Minor improvements forsupport of g64 images

10 May

  • Improved diskSYNC detection

8 May

  • update from today's previous version:- 1571 MFM uses the same disk surface as GCR.
  • Major update to 5.25 disk surface. 
    Improved custom speed zone handling. All VICE test repository RPM tests pass.
    1571 burst MFM support. All R/W tests of the 1571 system version  test 1.2.1 including MFM format and mfm burst write/read/compare pass.

29 March

  • Improve VIA shift register behavior.  All VICE test repository shift register tests pass

28 March

  • Fix VIA handshaking of CB2.  Majority of VICE VIC 20 VIA SR tests pass.

27 March

  • VICIIModel command line option. Possible values 6569, 8565, 6567, 8562, or 6567r56a.

21 March

  • Fixed update of Testbench directory.  Can use testbench straight away once valid testbench directory is configured.

20 March

  • Add drive8type, drive9type, drive10type, and drive11type command line options.  Possible values are none,1541, 1571, or 1581. e.g Z64K.jar c64 -drive8type 1571

15 March

  • Updated Userport DAC to have four 8 bit D/A Convertors. ModPlay DigiMAX stereo - 8 bit  userport DAC driver is now supported.

14 March

12 March

  • Increase timeout before hard reset when autoloading file off disk via command line options.  C128 can start programs off disk in c64 mode now.
  • Autostart of program of mounted disk using wildcard via command line options loads first PRG file off disk

30 January

  • Fix z80 behavior using bank 2 without extended memory

12 January

  • Updates to c128 mmu.  mmuswap-08 and mmuswap-16 pass.  All test results match real hardware.

10 January

  • Use correct block for zero page and stack when RAM backs 2 & 3 are enabled.  Fixes PIA globe test

3 January 2022

26 December

  • Allow autoload of file on disk via command line.  Append disk source filename with colon and file to be automatically loaded. eg java -jar Z64K.jar c64-8 G:\old_school\C64\disks\geos-plain.d64:boot
  • 128, 256, 512, 1024, 2024, and 4096 selectable GEORAM sizes.

11 December

  • Include updating Z80 registers HL in machine monitor
  • C128 writes to dxxx RAM in Z80 mode for bank 0
  • Enable beeper by default for ZX Spectrum

1 November

  • Fixed bug that prevented path and rom locations being reloaded from saved configuration.

30 October

  • opengl disabled by default.  Should only be enabled if UI issues occur on newer graphic cards.  Option to enable is available in General Global Settings.  Emulator needs to be restarted before effects are applied. 
  • new command line option -safemode.  Disables opengl in config if unable to access settings to unselect the opengl option, All other command line options are ignored in safemode  eg. java -jar Z64K.jar -safemode 

25 October

  • Use opengl for hardware acceleration. Fixes glitches in UI without need for Dsun.java2d.d3d=false as a VM option at startup. Improves screen refresh.

24 October

  • Swiftlink cartridge supports Turbo232 speeds
  • Cartridges that don't use IO1 and/or IO2 can be connected at the same time as other expansion devices.  
  • UI changes to cartridge settings.

18 October

  • Disable audio master gain adjustment for systems that don't support it.

12 October

  • Updates to Swiftlink cartridge to support retroterm
  • Included buffer free progress bar in settings for internal userport modem.
  • Improved some rs232 badly formed address error handling.
  • Echo, quiet and verbose toggle button available in settings for userport internal modem
  • Set echo default to false.  Prevents UP9600 driver in Striketerm being locked if modem on when driver selected
  • Detect when client disconnects.
  • Minor improvements to Hayes Modem command mode behavior.
  • Internal modem echo on and quiet off by default.  Echo only in command mode.

10 October

  • Improved timing of userport rs232 receiving of data.  Streaming of audio using retroterm 0.13 plays audio stream at correct speed and no longer causes modem buffer to overflow when playing long streams. 

9 October

  • Increase internal modem buffer size

4 October

  • Minor Improvements to Machine Monitor next command behaviour.
  • Added Machine Monitor next (n) command.  Single steps instruction but treats subroutines as a single instruction.  Note to self: Must find some decent icons for the single stepping icons. :)
  • Fixed debugging with monitor for C128 Z80 cpu memory locations $1800-$3fff
  • REU retains memory after reset

2 October

  • Allow Userport modem to send and receive data at same time

30 September

  • Added 57600 baud rate option for userport rs232 to support Retroterm V0.13

26 September

  • Fixed reset bug that wasn't clearing Z80 HALT state when interrupts were disabled.
  • Improvements with Z80 HALT timing
  • More improvements to ZX spectrum snow effect

19 September

12 September

  • Setting of Z80 registers using machine monitor is now functional
  • Setting of Z80/6502 registers with machine monitoruses current radix

30 August

1 August

  • Default internal modem with echo off, verbose on, and quiet on.
  • Improved internal modem Hayes command set.

31 July

  • Option to disable userport rs232 modem emulation.  Allows connection to tcpser etc.

29 July

  • Fixed broken fast 1581 serial caused by recent changes to support UP9600

28 July

  • Included a default keyboard mapping for German keyboards thanks to Tokra . Disclaimer: not thoroughly tested but is much better than the default English mapping when using a German Keyboard. :)
  • Fixed restore key for VIC20.

27 July

  • VIC 20 uses mike-pal.vpl as default
  • Some minor fixes with timing of VIC interlace signal
  • Userport rs232 modem synchronisation greatly improved.  Data transfers much more reliable with UP9600 and standard userport drivers.
  • Minor adjustment to value read for VIC $9004 register when in NTSC mode depending on cycle

25 July

  • Added UP9600 rs232 modem support.
  • Fixed bug with automatic loading of SDR value into CIA shift register when loaded at same time as final bit of previous SDRshifted out.

23 July

  • Improvements to Userport RS232.  Huge improvement with sending valid data!
  • Fixed ZX spectrum settings title
  • Allow ZX spectrum to be default application on startup 

21 July

  • Fixed bug with command line option -limitcycles that caused it not to trigger with TestBench scripts.

20 July

  • Minor change to latching behaviour to trigger on correct edge as set in ACR. Drive sends pulse from byte ready signalto trigger latching.

18 July

  • Update to VIA port latching.  Fixes VICE bug#582 and Freespin still works!

14 July

  • Fixed bug with VIA latching not clearing when CA1 interrupt is cleared.  Freespin demo doesn't crash anymore. :)
  • Added undocumented drive machine monitor commands motor and track
    motor [on:off] - turn motor on/off , without arguments prints status of drive motor
    track [in:out] - move rw head in/out 1 half track, without arguments prints current track

11 July

10 July

  • Enabled Internal Palette selector available in settings.
  • Updated default VDC palette to c128-vdc-deekay.vpl as suggested by Deekay in the readme of the Colour Spectrum demo.
  • Freespin runs on 1571 drive in addition to 1541
  • C128 support of drive GPU required for Freespin demo
  • Improved sync detection. Freespin display a lot more stable (when it actually runs).
  • Fixed bug with VIA reset code that would lock drive if PB7 output was on.  Freespin no longer locks the drive after reset.

9 July

  • Show correct frames/second in the frame title for all video chips, including simulated drive gpu.
  • Added sound support for Freespin demo.  note: Demo still does not run reliably every time yet in emulation but it is improving.  

8 July

  • Improved Freespin demo support.  Better drive sync detection. Displays graphical effects correctly (when it works)  warning: sometimes crashes the drive where the entire emulator needs to be closed and restarted.  Freespin support is still a work in progress.

    To play the Freespin demo, after the drive code has loaded, select Drive GPU from Machine settings==> Model panel.  When screen turn blacks reattach the same disk image to start the demo.
  • Fix debugging of Z80 LD A,I and  LD A,R

5 July

  • Added option to use disk drive as GPU for Freespin demo.  note: Not reliable and does not play sounds yet.
  • Some improvements to userport rs232 emulation.