rambo.jpg
Home arrow News arrow JaC64 - How to use!
JaC64 - How to use! PDF Print E-mail
Written by Joakim Eriksson   
Thursday, 19 August 2004

Using JaC64

 JaC64 is a 100% Java C64 emulator and thus requires Java (1.4 or better) installed.

Keyboard emulation is trying to emulate the real C64 keyboard as close as possible. Have a look at the below image for a reminder on that keyboard:

Commodore C64 Keyboard

A typical PC (or Mac?) keyboard would have more keys than the ones on the C64, but also missing a few of the C64 special keys. Here is a mapping of the most important keys on a english keyboard:

 PC Key C64 Key  PC Key  C64  Key
 Left Control

 Commodore 

 [ @
 Tab CTRL (Control)  ] *
 Esc  Run-Stop  ; :
 ~ (top-left) Arrow left ' ;
 - + Insert £
 = - End                Arrow up              

Joystick emulation (joystick 1 or 2):

  • Up: Numpad 8 or arrow up
  • Down: Numpad 5,2 or arrow down
  • Left: Numpad 4 or arrow left
  • Right: Numpad 6 or arrow right
  • Fire: Numpad 0 or shift

Other important key kombinations

  • control-f12 - toggle fullscreen mode (from 1.0 beta3)
  • control-alt-backspace - resets the emulator
  • control-w - toggle fullspeed mode

 

Installing/deploying JaC64

If you want to use JaC64 on your own website you need to have the c64.jar and a folder called "roms" with the rom files for the C64 for the applet to work. (This is included in the zip file). Then you need to add the applet specification. An example below:

<object
   classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93'
   codebase='http://java.sun.com/products/plugin/autodl/jinstall-1_4_1-windows-i586.cab#Version=1,4,1,0'
   width='384' height='270' id='c64'>
  <param name=code value='C64Applet'>
  <param name=archive value='c64.jar'>
  <param name=codebase value='/c64/'>
  <param name='doubleScreen' value='0'>
 
  <param name=type value='application/x-java-applet;version=1.4.1'>
  <param name='scriptable' value='true'>

 <COMMENT>
    <embed
       type='application/x-java-applet;version=1.4.1'
       name='c64'
       code='C64Applet'
       codebase='/c64/'
       archive='c64.jar'
       width='384'
       height='270'
       doubleScreen='0'
       autostartPGM='games/ARKANOID.PRG'
       scriptable='true'
       pluginspage='http://java.sun.com/products/plugin/index.html#download'
       alt='Your browser understands the <EMBED> tag but is not running the Java Applet, for some reason.'>
       <noembed>
      Your browser is completely ignoring the Java Applet!
       </noembed>
    </embed>
  </COMMENT>
</object>

This example autostarts the game Arkanoid in the file ARKANOID.PRG (in the folder /c64/games/). No double screen mode and applet size is 384x270.

Applet Parameters

Parameter
Name
 Value
*=default
Description 
doubleScreen0*/1 double the size of the generated C64 screen 

autostartDisk

string URL to the disk or tapefile (.d64/.t64) to load from 
autostartPGMstring

 1 name of the file on disk/tape given with disk, or
 2 URL to file (.prg file) to load directly 

autostartProgram string/intsame as above, except that it also can be used for starting a game in the games.txt file (by giving its index). If giving "random" as name, this will load a random program from the games.txt file
colorset0*/1/2/3 different colorsets, 0 - default old JaC64 colors, 1/2/3 - other more c64 near colorsets.
joystick0*/1 select joystick 
soundOn0/1* sound on if 1, off if 0.

 

Javascript calls

There are a lot of useful Java methods that can be called from Javascript to script the applet. Some of the most important are:

Method        Description    
 reset() resets the emulator
 setSoundOn(true/false) controls if sound should be on or off
 setStick(0/1) controls if stick 1 or 2 should be emulated
 loadPGM(Filename) loads a program file directly
 loadPGM(Disk, Filename) loads a program file from a specified disk

Typical usage is to add a link with a javascript call on, an example (where the applet is called c64):


<a href=javascript:document.c64.reset()>Reset</a>

 

Download! 

The JaC64 emulator can be downloaded from here:

jac64_1b3.zip

Image

Last Updated ( Sunday, 08 April 2007 )
 

This site is a member of WebRing.
To browse visit Here.

© 2008 JaC64 - Java Commodore C64 emulation, games and demos
Joomla! is Free Software released under the GNU/GPL License.