AOH :: CECBM3.FAQ
CBM Emulation Frequently Asked Questions
|
Archive-name: 8bit-emulation-faq/part3
Comp-answers-archive-name: commodore/8bit-emulation-faq/part3
News-answers-archive-name: commodore/8bit-emulation-faq/part3
Comp-emulators-cbm-archive-name: 8bit-emulation-faq/part3
Posting-Frequency: twice a month (monthly to news.answers)
Version: 2.3
CBM EMULATION FAQ - (Version 2.3 19 June 1995)
=================
This FAQ is usually posted twice a month on the 4th and 19th to
comp.emulators.cbm. Since comp.emulators.cbm was set up to remove the
emulator discussion from comp.sys.cbm, this FAQ will not be posted there.
Lines preceeded by a '+' have been added or modified since the last version
was posted.
The FAQ is in four parts due to its size.
Part 1 is general information and a list of available emulators.
Part 2 is questions and answers.
Part 3 is mostly data.
Part 4 is basically reviews of various emulators.
---------------------------------------------------------------------------
3.5 How-to... (moved from Appendix B).
1. Infocom adventures with PC64
2. Playing multi-disk-image games with C64S 1.0C
3. Using VIC-EMU.
4. Running certain games.
==========================================================
1. Infocom adventures with PC64
Author Peter Yew (p.yew@BoM.GOV.AU)
I have figured out how to save and restore Infocom adventure games in PC64.
Now I don't have to do the game in one sitting!
This is what I did:
First in PC64 directory, create a clean sub-directory: Infocom
In that put gamename.d64 (as the STORY disk) and a clean save.d64 (as the
SAVE disk).
To load game:
1) Choose Manager, select New
2) Find and click Infocom directory
3) Find and click gamename.d64 and double click it to load the game.
(Answer N at "Loading from a C1541 disk drive?" prompt)
While in PC64 , press f5 as often as needed to refresh directory
reading.
To save game while adventuring:
1) Type save
2) At "Position 1-5 (Default 1)>", type 1 (or what you can remember later)
3) At "Drive 8 or 9 (Default 8) >", type 8 (don't try 9, or it will crash)^?
4) At "Are You Sure (Y/N) >", type y (why waste time if you answer no?)
5) At "Insert SAVE disk into Drive 8. Press [RETURN] to continue >",
press alt + f9 to PC64 dialog box, click save.d64, click OK and
come back to C64 game screen, then press ENTER key. You
should have "saving position 1 ..." message and then
6) At "Insert STORY disk into Drive 8. Press [RETURN] to continue >",
press alt + f9 to PC64 dialog box again, click gamename.d64, OK and
come back to C64 game screen, then press ENTER key.
Now you can continue the game.
To restore game anytime:
1) Type restore
2) Give number of position: 1 (if you can remember?)
3) Give number of drive: 8 (don't try 9, or it will crash)
4) At Are You Sure (Y/N): y (why waste time if you ask no?)
5) At Insert SAVE disk .....: press alt + f9, click save.d64, click OK &
come back to C64 game screen, then press ENTER key. You
should have position restoring .... message.
6) At Insert STORY disk ...: press alt + f9, click gamename.d64, OK &
come back to C64 game screen, then press ENTER key.
Now you can continue the game.
Instead of saving to a separate disk, one can also use <Emulator / Save as>
to "freeze" the virtual C64 into a *.C64 file. Later you can <Emulator /
Open> this file or simply type it at the command line. This works also for
games which have no built-in saving capabilities. A shortcut for Save is
<Shift+F11>. If you lost your life and want to restore the game to the last
saved state, simply press <F11>.
---------------------------------------------------------------------------
2. Playing multi-disk-image games with C64S 1.0C
[Note that v1.1b of C64S allows multi-disk games without hassle. I
include this since some people may not like the time limit in the
shareware version of C64S 1.1b/c. -tsr]
J. Kevin Wells - nstn1297@fox.nstn.ca writes:
There is a method of playing multi-disk-image games with C64S 1.0C shareware.
The method is a bit cumbersome and works best with games that involve
infrequent disk changes.
1. Copy the first disk-image file as TESTDISK.D64.
2. Start C64S.
3. Load and play the game until you are prompted for a new disk.
4. Press F9 to bring up the utility options. Press Alt-T to enter the
tape-image section and press enter on TESTTAPE.T64.
5. Press F to select the Freeze option and type in a file name. Your game
will be saved to the tape drive. If the tape drive is full, delete a file
you do not need.
6. Press ESC to exit to the C64 emulator.
7. Press CTRL-BREAK to quit C64S and exit to DOS.
8. If the game has altered the disk-image in any way (saved your game to the
disk, for example), copy TESTDISK.D64 back to its original file name from
step 1.
9. Copy the requested disk-image file (usually Disk 2) to TESTDISK.D64
10. Start C64S again.
11. Press F9. Press Alt-T to enter the tape-image section and press enter on
TESTTAPE.T64.
12. Select the file you froze in step 5. Press ESC to exit to the emulator.
13. Press Shift-TAB to load and run the frozen program. The game should be
at the point where it is requesting the disk change. Follow the program's
instruction for signaling that you've changed the disk.
14. When prompted for another disk, repeat the process at Step 4.
One thing to keep in mind is that the Frozen program is kept on the tape
drive until you delete it. You might want to delete the frozen file when
you're finished playing the game, or between disk swaps. Remember that you
can use this frozen file to restore your game at the point it was frozen
again and again. The Freeze option is a very powerful feature, similar to
the Snapshot cartridge on the original C64. You can use it to save virtually
any program at any point - even games that don't have a save function.
I haven't tested this method of using multiple disks with every game out
there, but the ones I did try seemed to work. Try the method out with a
particular game, if possible, before getting into any heavy gaming sessions.
[note, again, that none of this stuff needs to be done with C64S 1.1b,
since it allows multi-disk games without hassle. The information is
included just in case you find the ten-minute timer on C64S 1.1b annoying.]
---------------------------------------------------------------------------
3. Using VIC-EMU.
Question:
Hi, I'm currently trying to use Peiter van Leuven's VIC-EMU to run some
VIC-20 software on my AMIGA. I have some VIC files on Amiga Formatted
floppy's as well, but the documentation doesn't say how to run it with the
emulator! It does suggest that you have to use memory addresses, but how
do us non-programmers know what memory addresses to use for a binary file
or a BASIC file? I've had no success. The command structure is like this;
vic-00 $???? filename
What is the proper address for ???? in order to get a program to run?
-------
Answer 1:
Well, you might be asking about at what position Basic starts on the VIC.
On an unexpanded machine, it starts at $1000 (and load file at $1001).
On a +3k machine (as the emulator default), it starts at $0400 ($0401)
On a +8k machine and more, Basic starts at $1200. (load at $1201)
Binary files normally load with LOAD "name",device,1 and you have to
find out where to load it yourself. (I know there's a method by looking
at the first bytes of the file, but I don't know how).
BTW: The version of VIC-EMU doesn't seem to load files inside the emulator
very well (e.g the load-command hangs, and there's no RESTORE key).
-------
Answer 2:
Well, Pieter sent me a message letting me know how to load a BASIC or
disk image file into the VIC-EMU. There is a way to find out what position
a file starts at, you look at the first four bytes of the file and then
switch them around, or something to that effect. Once you have done that you
use that number as the memory address:
vic-20 $1000 filename
Then from the VIC emulator screen you type LOAD "filename",8 and it will
load it. However, my problem is that from the CLI command, I'm not clear
on what filename I'm supposed to include! The filename for the program I
want to load or what? The emulator won't activate unless you include a
filename in the CLI command, but putting the filename for the disk-image
file you want doesn't seem to do anything, you still have to load it the
old fashioned way (LOAD "",8) to get it to show up. I guess my question
is; how do I just make the emulator activate (i.e. just like a vic after
power up) without having it run a program, etc
---------------------------------------------------------------------------
4. Getting certain games to work.
a. Racing Destruction Set
Oh, I bet I know what your Racing Destruction Set problem is. It's the
one that the game tells you to flip to side two, but it never tells you
to flip to side one. It's understood that you flip back to side one at
every significant pause in disk acess. In particular, if you modify a
car, then flip the disk back to side one before you leave the car
modification menu. After loading a track from side two, when you want to
return to the menu, flip back to side one BEFORE telling it to go back,
because it will hapilly try and load the menu from side two and crash.
From: Chuck Cochems (zaphod@camelot.bradley.edu)
b. Mail Order Monsters
This is a hint that works wonders on the 64 version of the game:
Copy your original disk (obviously not necessary for the emulators) and
change the disk name and ID (with a disk editor or utility program) to
"ownerdisk,ea" This makes your master disk an owner disk (there's ~100
blocks free on the original, each owner takes ~1 block of Commie disk
space, so you'll probably not have to worry about running out of
disk space.)
I have about 9 owners on a copy of the disk, and we have a lot of fun with
this game. Just keep hitting RETURN when it wants a disk. Enjoy.
From: Michael Miller (mmiller3@gac.edu)
c. Bruce Lee
Actually, I have yet to find a version of this game which doesn't crash
on a real C64 (NTSC or PAL). So, my advice is to reset and try again
if the game crashes on you.
4. A list of ftp sites where emulation programs can be obtained.
----------------------------------------------------------------
Some of the emulation programs are duplicated at other sites. I have not
listed every site that has a certain emulator, although I may have listed
more than one site that has that emulator.
If you would like to more about other cbm ftp sites then read the ftp list
which is posted to comp.sys.cbm regularly by Howard Herman
(72560.3467@CompuServe.COM).
Any site maintainer who wishes their site listed here only needs to send
me mail advising me of that fact!
Format for listing:
Site.Name /Directory
MACHINE - program name
4.0.1 Site Maintainers.
If you have any questions about specific emulator sites, then please
contact the person named below.
Site:
-----
ftp.funet.fi cbm-adm@ftp.funet.fi
frodo.hiof.no c64@hiof.no (Inge Morten Lillesand)
+ lennon.engr.wisc.edu conover@lennon.engr.wisc.edu (Joel Conover)
ftp.seattlelab.com ds@seattlelab.com (Derek Smith)
ftp.giga.or.at Guenther.Bauer@giga.or.at (Guenther Bauer)
+ Note that the ftp-site watson.mbb.sfu.ca is down permanently. The
+ site had been listed in several "warez" lists and Jeff Bryer (the admin)
+ was forced to close the site down by the SFU's sysadmins as a result.
+ -- Let us pause in reading the FAQ for a moment of silence... ...
4.0.2 Site IP addresses.
Site:
-----
frodo.hiof.no 158.36.33.4
+ ftp.seattlelab.com 204.250.145.1
4.0.3 Site Info.
This section provides a little information about each site, gathered from
wherever possible.
Site:
-----
frodo.hiof.no
-------------
The archive contains nearly the whole Watson-site. There's a bit missing
in the misc directory I believe, but I hope to get these files later.
Total archive contents is about 92 mb. At the moment, the capacity is
about 380mb. All of this space is granted to c64-emulation, but might
later be devoted to some true c64 users, if there's no need for that
much extra space. We'll see..
User access is limited to 10 users. I know that is not a lot, but please
be patient, and let us experiment a little. This computer is also being used
by 80 local users, so we'll have to see how much we can offer for the
ftp-users. Hopefully, it will rise to 20 or 30. There is much heavy
activity at this computer from 08 - 16 CET, and I recommend all users
to use this site from 16 - 08 CET.
Users have write access to "/incoming", so please put all software there,
together with information about where I should put it, which emulators it
supports, etc. Same as for Watson. It will help me a lot, and will make
this site stay up longer. I have very little spare time to administer
this site, but I'll try to tidy up two times a week.
ftp.giga.or.at
--------------
You searched and could not find any reasonable collection of C64
demos/emulators/geos stuff/etc. ?
Stop your frustration!
-And ftp to:
ftp.giga.or.at
One hell of a GIGA time... (don't get too horny...)
4.0.4 WWW Info.
With the rapid proliferation of Web sites having CBM info., it seems
fitting that they have their own section.
http://www.hut.fi/~msmakela/cbm <Marko Makela (Fi) C64 Homepage
http://www.cs.umd.edu/users/fms/comp/Emulation/Commodore.html <U. Maryland
C64 Homepage
http://www.nada.kth.se/~d93-alo/c64/ <Adam Lorentzon, (Se) C64 files Homepage
http://www.infinet.com/~rbatina <Roberto's Homepage
http://http.ecn.bgu.edu/users/gforte/cbm.emu.faq.toc.html <Adrian Forte's
(Emulator FAQ Homepage)
http://www.csd.uu.se/~d94aca/vic20.html <Anders Carlsson, (Se) Vic 20 files
Homepage
http://131.188.190.131/~poldi/c64.html <Daniel Dallmann, Stuttgart, (De),
aka "Poldi", C64 files Homepage
http://stekt.oulu.fi/~jopi/ <Jouko Valta, (Fi) C64 files Homepage
http://129.96.42.3:2374/~gardners/ <Paul Gardner-Stephen, Flinders U. (AU)
C64 files Homepage
http://www.seattlelab.com/c64s.htm <C64S Emulator @ SeattleLab.Com
HTTP://WWW.ENGR.WISC.EDU/~conover/c64.html <Joel Conover
http://stud1.tuwein.ac.at/~e9426444/index.html
This is the SID homepage, dedicated to music and stuff on the C64.
4.1 C64 Emulators.
Note: faui43.informatik.uni-erlangen.de:
/mounts/epix/public/pub/pc/msdos/emulators/c64
appears to be mirroring frodo's /c64/emulator directory,
and they're therefore listed together.
4.1.1 C64 Emulators for the Amiga.
faui43.informatik.uni-erlangen.de
/mounts/epix/public/pub/pc/msdos/emulators/c64
ftp.funet.fi /pub/cbm/c64/emulation
AMIGA - TheA64Package.lha
ccnga.uwaterloo.ca /pub/cbm/emulation
AMIGA - thea64package.lha
src.doc.ic.ac.uk /packages/aminet/misc/emu
AMIGA - C64Emulator.lha
ftp.wustl.edu /systems/amiga/boing/utilities/emulators/c64
AMIGA - a64v2d1.lzh & a64v2d2.lzh (TheA64Package.lha)
/systems/amiga/aminet/misc/emu
AMIGA - sys.lha and sys.readme
/pub/aminet/misc/emu
AMIGA - Frodo.lha
4.1.2 C64 Emulators for the PC.
faui43.informatik.uni-erlangen.de
/mounts/epix/public/pub/pc/msdos/emulators/c64
frodo.hiof.no
/pub/c64/utils
+ * Note that frodo is an official mirror site of seattlelabs ftp site
+ (204.250.145.1)
It is legal for him (and others) to continue to distribute the old
versions of C64S (v0.9a(b,c)). I will NOT be distributing the
registered version of C64S (like anyone thought I would).
Seattlelab is aware of the existance of frodo and it's collection
of software. Hopefully they will find it useful for testing purposes..
IBM PC - c64.zip
- c64s09a.zip
c64s09b.arj
c64s09c.exe
- c64alive.zip
c64a09ah.zip
- c64sally.zip
- c64neu.zip
ftp.funet.fi /pub/cbm/c64/emulation
IBM PC - c64.zip
- c64emu.zip
c64s09b.arj
ftp.uni-kl.de /pub/pc/dos/misc
IBM PC - C64ALIVE.ZIP
C64_09AS.ZIP
- c64_emu.zip
c64s09b.arj
ccnga.uwaterloo.ca /pub/cbm/emulation
IBM PC - c64.zip
wilbur.stanford.edu /pub/emulators/c64
IBM PC - c64.zip
ftp.uni-passau.de /pub/ibmpc/msdos/emulator
IBM PC - C64S09B.ZIP
- c64alive.zip
ftp.uni-giessen.de /pub/incoming/pc
IBM PC - c64s09b.arj
- c64alive.zip
ftp.rz.uni-hildesheim.de
/pdsoft/pub/c64/emlators/pc64
IBM PC - pc64_d.zip
- pc64_e.zip
CompuServe Magna forum, Library 4 (DOS programs)
IBM PC - pc64_d.zip
- pc64_e.zip
4.1.3 C64 Emulators for the Atari.
faui43.informatik.uni-erlangen.de
/mounts/epix/public/pub/pc/msdos/emulators/c64
frodo.hiof.no /pub/c64/utils
ATARI ST - c64-st.lzh
faui43.informatik.uni-erlangen.de
/mounts/faui45/atari/applications/emulators/c64
ATARI ST - c64.lha
ftp.funet.fi /pub/cbm/c64/emulation
ATARI ST - c64.lzh
4.1.4 C64 Emulators for the Macintosh.
faui43.informatik.uni-erlangen.de
/mounts/epix/public/pub/pc/msdos/emulators/c64
frodo.hiof.no /pub/c64/utils
APPLE MAC - MAC64-04.HQX
ftp.funet.fi /pub/cbm/c64/emulation
APPLE MAC - mac64-04.hqx
4.1.5 C64 Emulators for Unix.
faui43.informatik.uni-erlangen.de
/mounts/epix/public/pub/pc/msdos/emulators/c64
frodo.hiof.no /pub/c64/utils
UNIX/X - x64-0.2.2.tar.gz
ftp.funet.fi /pub/cbm/c64/emulation
UNIX/X - x64-0.2.2.tar.gz
ccnga.uwaterloo.ca /pub/cbm/emulation
UNIX/X - x64-0.2.2.tar.gz
wilbur.stanford.edu /pub/emulators/c64
UNIX/X - x64-0.2.2.tar.gz
http://stekt.oulu.fi:/~jopi/x64.html
x64 emulator documents, not the program itself.
4.2 VIC20 Emulators.
ftp.hrz.uni-kassel.de /pub/machines/vic-20/vic-emulator
AMIGA - vic-emu.lha
src.doc.ic.ac.uk /packages/aminet/misc/emu
AMIGA - vic-emu.lha
ccnga.uwaterloo.ca /pub/cbm/util64
C64 - vic-emulatorC64.lnx
4.3 C128 Emulators.
See section 4.1.5. X128 comes with the X64 emulator.
4.4 PET Emulators.
No sites known.
4.5 SID Emulators.
frodo.hiof.no /pub/c64/sidmusic
IBM PC - sidpl???.zip
AMIGA - playsid3.lha
delisid.lha
ATARI ST - mmm226.lzh
cnam.cnam.fr /pub/Amiga/mus/play
AMIGA - PlaySID2.2.lha
ftp.germany.eu.net /pub/comp/amiga/music
AMIGA - PlaySID2.1.dms
ftp.uni-hamburg.de /pub/dos/incoming
IBM PC - sidpl???.zip
ftp.funet.fi /pub/amiga/audio/apps/playback
AMIGA - PlaySID-2.0.lha
ftp.uni-paderborn.de /pub/pc-demos/music/programs/players
IBM PC - sidpl???.zip
4.6 Non-Emulators.
nic.funet.fi /pub/cbm/c64/emulation
AMIGA - C64Emulator.lha
ftp.cnam.fr /pub2/Amiga/emu
AMIGA - C64Emulator.lha
ftp.germany.eu.net /pub/newsarchive/comp.sources.amiga/volume89/fun
AMIGA - c64.1.Z (C64Emulator.lha)
4.7 Other utilities & files.
4.7.1 Utilities
frodo.hiof.no /pub/c64/utils
IBM PC - disk64e.arj
c64uti5.zip
maketape.arj
copy2d64.arj
zip2d64.arj
d64util.zip
d64_10.zip
d64zipcode.c
tr64_114.zip
tr_src11.zip
and many, many others..
AMIGA - maketape.arj
unt.lzh
ftp.funet.fi /pub/msdos/utilities/diskutil
IBM PC - copy2d64.arj
zip2d64.arj
ftp.funet.fi /pub/cbm/emulation
AMIGA - d64.lha
IBM PC - dir_d64.zip
cnam.cnam.fr /pub2/Amiga/emu
AMIGA - d64.lha
ccnga.uwaterloo.ca
IBM PC - tr64_114.zip
tr_src11.zip
64copy20.zip
4.7.2 Data files.
frodo.hiof.no /c64/games/ (.t64 * .d64 files)
frodo.hiof.no /c64/misc/ (.t64 * .d64 files)
lennon.engr.wisc.edu /pub/c64/games
/pub/c64/misc
nic.funet.fi /pub/amiga/audio/misc/sid-tunes
AMIGA - C64MusicShow-1.lha (for use with PlaySID/sidplay)
C64MusicShow-2.lha
Addition.lha
ftp.cnam.fr /pub2/Amiga/mods/PlaySid
AMIGA - C64MusicShow-1.lha (for use with PlaySID/sidplay)
C64MusicShow-2.lha
Addition.lha
ftp.cs.tu-berlin.de /pub/amiga/audio/mods-c64
AMIGA - C64Sounds.lha (for use with PlaySid/sidplay)
ftp://ftp.wustl.edu/systems/amiga/aminet/mods/chip/
ftp://src.doc.ic.ac.uk/packages/aminet/mods/chip/
AMIGA - NemeSIDs-* (collection of C64 music)
- note: these at just some of the aminet sites where the files should be
available.
frodo.hiof.no /pub/c64/sidmusic
AMIGA or
IBM PC - NemeSIDs*.lha (The biggest collection so far)
rippoff5.zip (New tunes not included anywhere else)
demo_new.lha -"-
game_new.lha -"-
Also take a look at the SIDPLAY FAQ covering a list of Ami-Net FTP servers
and sidtunes related information.
=====================================================================
5. Emulator File Formats.
-------------------------
As there are several emulators for different platforms, they all
cannot be made directly usable by other emulators, unless the author
has provided that facility. Utilities to convert back into CBM
binary generally exist fortunately.
5.1 C64 Emulators standard files - overview.
This section shows the "normal" files used by each emulator.
Program File type Identification Contents
(name or method)
c64.zip (PC) disk image VC1541.000 683 pcs 256-byte sectors
tape image - not used
C64S (PC) basic rom } contains binary data for:
kernel rom }- romcode.c64 VC1541 (16384 bytes), chargen
chargen rom } (4096),basic (8192) and kernel
disk drive rom} (8192) = total 36864 bytes
program - not used
disk image 09c *.d64 683 pcs 256-byte sectors
09a,b testdisk.d64
tape image *.t64 ?
Note: the kernel part is modified.
c64sally.zip basic rom A000BFFF.64F 8194 bytes of binary data (1)
(PC) kernel rom D000DFFF.64P 8194 bytes of binary data (1)
chargen rom E000FFFF.64P 4098 bytes of binary data (1)
disk drive rom - not used
program *.64P C64 program with load address
also SEQ files via *.64S
disk image - not used
tape image - not used
pc64*.zip basic rom *.64B 8192 bytes of binary data
(PC) kernel rom *.64K 8192 bytes of binary data
chargen rom *.64C 4096 bytes of binary data
module at $8000 *.64M 8192 or 16384 bytes of binary
data (8K at $A000 = *.64B)
disk drive rom VC1541.64D 16384 bytes of binary data
program *.P00 C64 program with load address
preceded by 24 byte header.
SEQ data file *.S00 same as *.P00 with different
USR data file *.U00 | extensions. The 00 can be
DEL data file *.D00 | any numbers if the 16-to-8
REL data file *.R00 | mapping leads to duplicates.
disk image *.D64 683 pcs 256-byte sectors, plus
optionally 683 bytes error info
tape image - not used
c64.lzh (ST) basic rom c64/_basic 8192 bytes of binary data
kernel rom c64/_kernal 8192 bytes of binary data
chargen rom c64/_font 4096 bytes of binary data
disk drive rom - not used
program - C64 program with load address
disk image - not used
tape image - not used
x64 (UNIX) basic rom basic 8192 bytes of binary data (2)
kernel rom kernel 8192 bytes of binary data (2)
chargen rom - not used
disk drive rom - not used
program - C64 program with load address
disk image magic header 64 byte magic header and
683 pcs 256-byte sectors
tape image - not used
rom module filename 8192 or 16384 byte cartridge,
stored in binary format
ram image ram RAMSIZE + 4103
(x64 will load a ram image, eg. "the contents of RAM as
in warm start" at startup, if one exists)
Only the RAM is loaded at startup. CPU registers and I/O
are loaded only via 'undump' in the monitor. (That way it
won't keep crashing all the time.)
(1) Includes load address.
(2) Default load address allowed.
5.2 Table of supported file formats.
This section shows which emulators can access which file formats,
unaltered. It is quite incomplete!
Legend used in table:
(Legend changed for fast grasp, thanks Wolfgang!)
x = yes, fully supported, c = convertor provided, - = no, and
empty = unknown.
x64dsk d64 t64 p00 CBM
X64 x c x
PC64 1.10 - x c x c
C64S 1.1A - x x c c
C64Alive 0.9ah - - - - x
5.3 Standard data files - internal formats.
This section shows the internal format used by each filetype. Most of
it was taken from the compatibility section of the x64 manual, and was
provided by Jouko 'Jopi' Valta. That section is based on the information
acquired from news articles written by:
blohm@mathematik.uni-ulm.de (Guntram Blohm)
kbrisley@tsegw.tse.com (Kevin Brisley)
File: ram (x64) Total Size: RAMSIZE + 4013
---------------------------------------------------
Offset Bytes Description
0 RAMSIZE contents of the RAM
The following data is not included yet:
RAMSIZE 4096 I/O area with shadows
7 CPU Registers: PC (LO/HI), AC, XR, YR, PS, SP
File: x64 Disk File Total Size: 174912
------------------------------------------
Offset Bytes Description
0 4 Magic header: 'C',0x15, 0x41, 0x64
4 4 Header Version:
C1541 Version Major
C1541 Version Minor
Device Type: 0 = 1541
Max Tracks: 35 (from disks v1.2 upwards)
64 256 byte sectors
File: *.d64 disk image Total Size: 174878
------------------------------------------
D64 File Structure was developed by Miha Peternel for use in C64S.
D64 file contains all sectors as they appear on the 1541 formatted disk.
Each sector is 256 bytes long. Error information (1 byte per sector)
can be added in the end of file.
__________________________________
File types currently supported
174848 bytes = 35 tracks
175531 bytes = 35 tracks + 683 bytes error information
196608 bytes = 40 tracks
197376 bytes = 40 tracks + 768 bytes error information
_______________
Track sizes
Tracks, size
1-17 21 sectors * 256 bytes
18-24 19 sectors * 256 bytes
25-30 18 sectors * 256 bytes
31-35 17 sectors * 256 bytes
*36-40* 17 sectors * 256 bytes
Tracks 36-40 are non-standard.
____________________________________
Actual layout for 35 track image
Offset, size, description
0*256, 256 track 1, sector 0
1*256, 256 track 1, sector 1
...
20*256, 256 track 1, sector 20
21*256, 256 track 2, sector 0
...
682*256, 256 track 35, sector 16
683*256, 683 error info (byte per sector in the same order)
Sectors are 256 bytes. Sector 0 is at offset $00000 in the .d64 file.
Sector 1 is at offset $00100 in the .d64 file, and so on.
A normal 1541-format disk is divided into 4 'zones' -
zone 1 = tracks 1-17 with 21 sectors (numbered 0-20)
zone 2 = tracks 18-24 with 19 sectors (numbered 0-18)
zone 3 = tracks 25-30 with 18 sectors (numbered 0-17)
zone 4 = tracks 31-35 with 17 sectors (numbered 0-16)
The directory lies on track 18. The following info is for
track 18 -
sector 0 = Block Availability Map (bytes 00-8f, bitmapped)
bytes 90-9f = disk name (16 chars, space padded)
The first 2 bytes are track and sector to the
first directory block. Usually the first directory
block is the very next block on the disk
directory blocks:
byte 0 = track of next directory block
byte 1 = sector of next directory block
bytes 2-31 = file entry #1
bytes 32-33 = unused (should be 0)
bytes 34-63 = file entry #2
bytes 64-65 = unused, etc etc
The first byte of a file entry is the type of file ($82 = PRG,
$81 = SEQ, $83 = USR, $80 = DEL, $84 = REL). The next two bytes
point to the track & sector of the first sector of the file.
The next 16 bytes is the filename (padded). The last two bytes
(i.e. bytes 30 & 31) gives the block count of the file (in low
byte/high byte format).
Each file block has 254 bytes of data, unless it is the last block. The
first 2 bytes of each block are the track and sector of the next block.
If the track is zero then this is the last block, and the sector # really
tells the number of bytes used out of the 254 possible. The use count is
the number of bytes used plus 1--so if the sector # has a $05, then really
only $04 bytes were used out of the last block.
The directory is at offset $16500 in the .d64 files. Tracks references
start at 1. Sector references start at 0. So if the first 2 bytes of a
block are $06 04, the absolute location is at
5 * $1500 + 4 * $100.
(5 because that's $06 minus 1. $1500 because at track $06 there are 21
sectors per track, or $1500 bytes. 4 because that is the sector number,
and $100 because that's the number of bytes in a sector.)
The disk has a total of 35 tracks. There are 17 trachs with 21 sectors (357
sectors total), 7 tracks with 19 sectors (133 sectors total), 6 tracks
with 18 sectors (108 sectors total), and 5 tracks with 17 sectors (85
sectors total). So total sectors per disk (or .d64 image) is
357+133+108+85 = 683 total, or 174,848 bytes total, which is the exact
size of the .d64 files.
File: *.t64 tape image Total Size: Varies
------------------------------------------
Offset Bytes Description
0 64 Tape Record:
0 32 Tape description + EOF (for type)
32 2 Tape version: $0100
34 2 Max number of files, in LO/HI
36 2 Number of existing files, in LO/HI
38 2 -
40 24 User description, as displayed in file menu
64 32*n File Record(s) for each of n files:
+0 1 Slot allocation flag:
00 = free entry
01 = normal tape file
03 = memory snapshot v0.9, uncompressed
02..FF = reserved for memory snapshots
+1 1 File type
+2 2 Start address in C64 memory, in LO/HI
+4 2 End address in C64 memory, in LO/HI
+6 2 -
+8 4 File start address on the image, in LO/HI
+12 4 -
+16 16 C64 filename
64+32*n ??? File contents.
Wolfgang Lorenz (author of PC64) posted the following in an open letter
to Miha Peternel (author of C64S). AFAIK there's been no reply.
There is some ambiguity in the T64 file format. Could you please make a
statement if the following assumptions are correct?
Tape Record
Offset, size, description
0, 32 DOS tape description, ASCII charset, contains either
"C64S tape file",13,10,"Demo tape",26,"......" (no 0!) or
"C64S tape image file",0,0,0,0,0,0,0,0,0,0,0,0 or
"C64 tape image file",13,10,0,0,0,0,0,0,0,0,0,0,0
To identify a T64 file, search for the sub-strings "C64" and
"tape".
32, 2 tape version, currently $0100 or $0101
34, 2 number of directory entries, mostly $001E
36, 2 number of used entries (0 for unknown)
38, 2 free
40, 24 user description as displayed in tape menu, CBM charset,
padded with space
File Record
Offset, size, description
0, 1 entry type
0 = free entry
1 = normal tape file
3 = memory snapshot v0.9, uncompressed
2..255 reserved (for memory snapshots...)
1, 1 C64 secondary address, mostly 1
2, 2 start address
4, 2 end address
6, 2 free
8, 4 offset of file contents start within T64 file
12, 4 free
16, 16 C64 file name, CBM charset, padded with space
Example Structure Definitions for C and C++
struct {
char acTag[32];
word wVersion;
word wEntries;
word wUsedEntries;
word wReserved;
byte abName[24];
} T64Header;
struct {
byte bType;
byte bSecAdr;
word wStartAdr;
word wEndAdr;
word wReserved;
long lOffset;
long lReserved;
byte abName[16];
} T64Entry;
File: CBM Files Total Size: Varies
---------------------------------------
Offset Bytes Description
0 2 Load address in LO/HI format.
File: *.p00 file image Total Size: Varies
------------------------------------------
Offset Bytes Description
0 9 String "C64File" terminated by 00.
9 17 Original C64 Filename.
10 1 Record size for REL files.
26 Original file
5.4 Converting between file formats.
Instructions on how to interconvert between all of the formats used
by the various C64 emulators.
Formats:
1) .d64 - Disk image used by C64s
2) .t64 - Tape image used by C64s
3) .p00 - image format used by PC64
Conversions:
1) .p00 to .t64
a) Start PC64
b) First get a "Manager" window up
c) Place the cursor on the *.P00 file you want converted
d) Then use "Manager/Export" (ALT-M-E). This will save it as a *.PRG.
e) Then use MAKETAPE.EXE to make a *.t64 file.
2) .t64 to .p00
Use t64top00.exe, which comes with PC64 and creates p00 copies of all the
t64 files in a directory tree.
6. How to extract the Rom images required by the emulators.
-----------------------------------------------------------
Type in the following files on your C64 and run them to get the rom image
files. Then transfer those files onto the machine that you require.
See the comp.sys.cbm FAQ section 7 for some details on transfers.
Alternatively, You could get TheA64Package.lha and extract the file called
TheA64Package/64Prgs/SaveROMs. This will extract the basic and kernal roms
from a C64.
Note that this stuff is only required if your emulator doesn't come with
ROMs. Both C64S and PC64 come with ROMS, so don't worry about that.
6.1 C64 roms - Basic, Kernal & Charset.
C64 BASIC ROM extractor:
10 OPEN 5,8,2,"64BASIC,P,W"
20 FOR X=40960 TO 49151:PRINT#2,CHR$(PEEK(X));:NEXT
30 CLOSE 5
C64 KERNEL ROM extractor:
10 OPEN 5,8,2,"64KERNEL,P,W"
20 FOR X=57344 TO 65535:PRINT#2,CHR$(PEEK(X));:NEXT
30 CLOSE 5
C64 BASIC and Kernal ROM extractor:
10 OPEN5,8,5,"0:C64ROM,S,W"
20 FOR X=40960 TO 49151
30 A$=CHR$(PEEK(X))
40 PRINT#5,A$;:NEXT
50 FOR X=57344 TO 65535
60 A$=CHR$(PEEK(X))
70 PRINT#5,A$;:NEXT
90 CLOSE5
C64 Character ROM extractor:
10 POKE 56334,0:POKE 1,51
20 FOR X=16384 TO 20479:POKE X,PEEK(X+36864):NEXT
30 POKE 1,55:POKE 56334,1
40 OPEN 5,8,5,"64CHARGEN,P,W"
50 FOR X=16384 TO 20479
60 PRINT#5,CHR$(PEEK(X));:NEXT
70 CLOSE 5
6.2 VIC20 roms - Basic, Kernel & Charset.
VIC20 BASIC ROM extractor:
10 OPEN 5,8,2,"V20BASIC,P,W"
20 FOR X=49152 TO 57343:PRINT#5,CHR$(PEEK(X));:NEXT
30 CLOSE 5
VIC20 KERNEL ROM extractor:
10 OPEN 5,8,2,"V20KERNEL,P,W"
20 FOR X=57344 TO 65535:PRINT#5,CHR$(PEEK(X));:NEXT
30 CLOSE 5
VIC20 Character ROM extractor:
10 OPEN 5,8,2,"V20CHARGEN,P,W"
20 FOR X=32768 TO 36863:PRINT#5,CHR$(PEEK(X));:NEXT
30 CLOSE 5
6.3 1541 rom.
C1541 ROM extractor:
Extract area $C000-$FFFF
100 B=16384:I=B
110 OPEN 15,8,15
120 FOR H=192 TO 255:PRINT H;
130 FOR L=0 TO 255
140 PRINT#15,"M-R";CHR$(L);CHR$(H)
150 GET#15,A$
160 Z=FRE(0)
170 POKE I,ASC(A$+CHR$(0))
180 I=I+1:NEXT L
190 NEXT H
200 CLOSE 15
210 OPEN 5,8,5,"0:C1541ROM,P,W"
220 FOR X=B TO I-1:PRINT#5,CHR$(PEEK(X));:NEXT
230 CLOSE 5
7. Other information.
---------------------
7.1 Newsgroups worth reading.
If you are wanting as a question about an emulator or read what other
people are saying, then I recommend that you read comp.emulators.cbm :)
Another good group to read for general info about Commodore 8bit machines
is comp.sys.cbm.
7.2 Emulator benchmarks.
Some people are interested in the relative speed of the emulators with
respect to the actual machine it's emulating. So far, only the following
simple test program has been used in benchmarking emulators. More tests
and more machines are needed!
Benchmark test #1.
10 a = ti
20 print "[clr/home]"
30 for i = 1 to 1000
40 print "[up][up]"; i ; i * i
50 next
60 print "[down][down] time = "; ti -a
Results:
"Machine" "Config" "Software" "Score"
C128 64 mode CBM BASIC 1590
C128 40 col CBM BASIC 2226
C128 40 col fast CBM BASIC 1071 (1)
C128 80 col CBM BASIC 4072
C128 80 col fast CBM BASIC 2062
Sun SPARC IPC 8Mb RAM x64-0.2.2 1452 (2)
Osborne 486 DX2/50 16Mb RAM c64hercules 286
Osborne 486 DX2/50 16Mb RAM c64sally 234
Osborne 486 DX2/50 16Mb RAM c64s10cd 1486
Osborne 486 DX2/50 16Mb RAM c64neu 2985
Osborne 486 DX2/50 16Mb RAM c64alive --- (3)
Amiga 3000/25 6Mb RAM A64v2 788
Atari 1040 STfm Hi-res c64.tos 3567 (58 s real)
Atari 1040 STfm Low-res c64.tos 3624 (58 s real)
Notes:
(1) Screen automatically blanked during test.
(2) "ti" clock doesn't necessarilly keep real time in x64. In x64 the ti
clock is relative to the virtual speed, not the wall clock time.
(3) c64alive wouldn't run on test machine. Doh.
7.3 Emulator detection.
Writers of software on the C64 or emulators may wish to know whether the
"machine" their code is executing on is a real C64, or not. A small
BASIC program was written by Wolfgang Lorenz, and posted by Paul David
Doherty, which tests this.
Critical addresses for the PIA expansion
The critical addresses of the device are 57216--57343 ($DF80--$DFFF).
There is the PIA chip to which you POKE the values to switch memory
blocks. The PIA does not have 128 registers, as one might think. There
are sixteen copies of its 4 addresses in that memory area. For instance,
the addresses 57216, 57284, 57288 and 57340 are equivalent to each
other.
here's a small CBM-BASIC program by Wolfgang Lorenz which tests
whether it is running on a real C-64 or on an emulator. It also
contains a suggested method for emulators to allow other programs
to detect them. This detection method is already implemented
in the PC64 and C64S emulators; it would be nice if other emulators
(A64, MAC64, C64ALIVE, X64) would adhere to it too.
100 rem *** where am i? ***
105 rem -------------------------------
110 rem this is the recommended method
115 rem how to detect a c64 emulator,
120 rem e.g. for disabling fast loaders
125 rem
130 rem - the byte at $dfff changes
135 rem between $55 and $aa
140 rem - the byte at $dffe contains
145 rem the manufacturer code letter:
150 rem a = c64alive
155 rem l = mc64 beta 10-12, now free
160 rem m = mc64 beta 13-17, now free
161 rem p = personal c64
175 rem s = c64 software emulator
180 rem x = x64
185 rem - the word at $dffc contains
190 rem the emulator version number,
195 rem e.g. $0120 for version 1.2
200 rem - the bytes from $dfa0 contain
205 rem a copyright string with
210 rem emulator name and version,
215 rem $0d, copyright and $00. this
220 rem was at $df00 in early mc64
225 rem betas, but had to be moved
230 rem because $df00 is reserved for
235 rem ram expansion units
240 :
245 print:x=57343:if peek(x)<>85 then if peek(x)<>85 then 360
250 if peek(x)<>170 then 360
255 if peek(x)<>85 then 360
260 if peek(x)<>170 then 360
265 m$=chr$(peek(57342)):print "manufacturer = '";m$;"' ";
270 if m$="a" then print "(c64alive)";
275 if m$="p" then print "(pc64)";
285 if m$="s" then print "(c64s)";
290 if m$="x" then print "(x64)";
295 print:v=peek(57340)+peek(57341)*256
300 for i=0 to 3:v$=mid$("0123456789abcdef",1+(v and 15),1)+v$:v=int(v/16):next
305 print "version = $";v$
310 print:poke 780,160
315 if (m$="m" or m$="l") and v$="0100" and peek(60686)<>2 then poke 780,0
320 poke 782,223:sys 43806:print:end
325 :
330 rem -------------------------------
335 rem these are manufacturer-specific
340 rem workarounds, which should be
345 rem replaced with the official
350 rem emulator detection method
355 :
360 if peek(60682)<>0 then 385
365 print "c64 software emulator"
370 print "(c)1991-94 miha peternel"
375 end
380 :
+ 385 if peek(60736)<>0 then 410:rem untested
390 print "x64 (version 1 or 2)"
395 print "(c)1993-94 j.sonninen/t.rantanen/j.valta"
400 end
405 :
410 x=57087:if peek(x)+peek(x)+peek(x)<>0 then 435
415 print "c64alive"
420 print "(c)1993-94 f.littmann developments"
425 end
430 :
435 print "this is an original c64 or c128"
You can distinquish a real C128 from C64 by testing the VDC status register
at $D600/$D601: If the value written to $D601 remains intact, its a C128 in
either mode, otherwise a real C64. There is no way (or need) to tell C64
from C64c though.
7.4 Other sources of information.
There are a number of WWW addresses that may be of interest...
- The Commodore 64 WWW Server.
(Has a few c64s and x64 documents)
http://www.hut.fi/~msmakela/c64.html
- WWW Personal Computing and Emulation Homepage
(General emulator pages, not just Commodore)
http://www.cs.umd.edu/users/fms/comp/
- Commodore emulation
(The Commodore section from the link above)
http://www.cs.umd.edu/users/fms/comp/Emulation/Commodore.html
- X64 Emulator / Simulator For Unix
(Offical site for x64)
http://stekt.oulu.fi/~jopi/x64.html
- Commodore 64 computing
(Home of the comp.sys.cbm FAQ)
http://www.msen.com/~brain
- Seattle Labs
(Marketers of C64S)
http://www.seattlelab.com/c64s.htm
=========================================================================
The entire AOH site is optimized to look best in Firefox® 3 on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986- AOH
We do not send spam. If you have received spam bearing an artofhacking.com email address, please forward it with full headers to abuse@artofhacking.com.