home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 224 / 224.d81 / t.e2 < prev    next >
Encoding:
Text File  |  2003-01-01  |  13.6 KB  |  506 lines

  1. u
  2.  A B O U T   E M U L A T O R S   I I
  3.           by Professor Dredd
  4.            aka Ken Kill, Jr
  5.  
  6.  
  7. IMAGE FILES
  8.  
  9.     You probably know that C-64 tapes,
  10. disks and cartridges don't work on a
  11. PC. To get C-64 data onto a PC hard
  12. drive, you need method of encoding the
  13. data. The emulator must be able to
  14. recognize and decode the data as a
  15. C-64 program. That's what images are
  16. all about.
  17.  
  18.     For the most part, an image is a
  19. byte-for-byte duplication of actual
  20. data taken from a piece of C-64 media.
  21. This media may be a C-64 tape, disk or
  22. cartridge or even a ROM chip from
  23. inside the computer. Some image files
  24. contain additional header data telling
  25. the emulator what's in the image and
  26. how its organized. The technical
  27. details of the various image formats
  28. and their respective header data can
  29. be found in the document "FORMATS.ZIP"
  30. by Peter Schepers. Obtain this file
  31. at:
  32.  
  33.        http://www.fairlight.to/
  34.  
  35.     The creation of image files and
  36. the process of transferring them
  37. between the C-64 and PC are topics
  38. worthy of their own articles. See your
  39. emulator docs as well as the above web
  40. site for some helpful info and tools.
  41. Also check out the newsgroup:
  42.  
  43.  comp . emulators . cbm
  44.  http://groups.google.com
  45.  
  46. Some image files are included with
  47. CCS64. These include:
  48.  
  49.  Kernal.rom - Binary image of the
  50.    Commodore 64 KERNAL ROM taken from
  51.    $E000-FFFF
  52.  
  53.  Basic.rom - Binary image of the
  54.    Commodore BASIC 2.0 interpreter ROM
  55.    taken from $A000-BFFF
  56.  
  57.  Char.rom - Binary image of the C-64
  58.    character fonts taken from
  59.    $D000-DFFF
  60.  
  61.  C1541.rom - Binary image of CBM DOS
  62.    V2.6 1541 taken from $C000-FFFF of
  63.    the 1541
  64.  
  65.  CCSMon.crt - This is a cartridge
  66.    image. It contains a machine
  67.    language monitor you can use with
  68.    the emulated C-64. It behaves very
  69.    similar to a HesMon cartridge
  70.    plugged into a real C-64.
  71.  
  72.  
  73. ROM IMAGES
  74.  
  75.     You never have to worry about the
  76. KERNAL, BASIC and Character ROM's. As
  77. long as they're present in the CCS64
  78. folder, the emulator will function
  79. correctly. It is possible to replace
  80. these images with alternate ROM's, or
  81. even customize them yourself. You can
  82. download some alternate ROM sets from:
  83.  
  84. ftp://arnold.c64.org/pub/ut ils/roms/
  85.  
  86.     You could write a new operating
  87. system for the C-64. If you assemble
  88. the OS and copy the binary (object or
  89. executable) code to a PC formatted
  90. disk and name it with a .ROM
  91. extension, you can use CCS64 to test
  92. it. If you want to run the new OS on a
  93. real C-64, burn it into EPROM and plug
  94. it in!
  95.  
  96.     Such a custom OS need not include
  97. a BASIC interpreter. You could create
  98. any sort of environment you like to
  99. compute in such as LINUX or CP/M! Of
  100. course, this would be an ambitious
  101. project indeed, and would require an
  102. extensive knowledge of the C-64
  103. hardware. I.E. you'll have to write
  104. all your own drivers for keyboard,
  105. video and disk/tape I/O. Then again,
  106. you can borrow as much of the original
  107. KERNAL as you like and make any
  108. necessary modifications as you go.
  109.  
  110.     Some simple customizations which
  111. don't require writing an entirely new
  112. OS might include:
  113.  
  114. - new startup colors.
  115. - new character font sets
  116. - custom startup text (e.g. "WELCOME
  117.    PROFESSOR, SHALL WE PLAY A GAME?")
  118. - enhanced BASIC functions for GET#,
  119.    INPUT or other commands
  120. - added BASIC commands like MODulus,
  121.    GRAPHIC, PLOT (ever wish "Simon's
  122.    BASIC" didn't tie-up the cartridge
  123.    port?)
  124. - fast I/O routines for disk/tape
  125.    (most alternate ROM's include
  126. these)
  127. - built-in DOS wedge or BASIC
  128.    7.0-style DOS commands
  129. - C-128-style autobooting from drive
  130.    #8
  131. - anything you can imagine!
  132.  
  133.  
  134. CARTRIDGE IMAGES
  135.  
  136.     CCS64 includes CCSMon.crt as a
  137. convenience for ML programmers. It can
  138. be handy for tweaking programs that
  139. don't fully function on the emulator,
  140. or for breaking into a game to add
  141. cheats (e.g. infinite lives,
  142. invincibility.) You can get other cart
  143. images from:
  144.  
  145.   ftp://arnold.c64.org/pub/games/
  146.   Cartridges/
  147.  
  148. Using a cartridge image with CCS64 is
  149. the equivalent of physically plugging
  150. a real cart into a real C-64, and you
  151. should think of it that way.
  152. Cartridges are supported by the
  153. current release  CCS64 2.0b, but not
  154. on older versions. Check the manual
  155. accompanying your version for
  156. details.
  157.  
  158.     From the C-64 screen, hit ALT-C to
  159. go to the "Cartridge" menu. Here you
  160. see various functions which control
  161. the operation of the emulated
  162. cartridge port. Highlight "Insert
  163. Cartridge" and press F1. Now you see
  164. the "Insert Cartridge" file menu. PAY
  165. ATTENTION because all the file menus
  166. in CCS work the same!
  167.  
  168.     The first entry, ".." is used to
  169. go up one level in the directory
  170. hierarchy. Below that is a list of
  171. files in the current directory. At the
  172. bottom is a list of all drives
  173. currently active on your PC such as
  174. A:, C: and D:
  175.  
  176.     If you're not already inside the
  177. CCS64 folder (the one you unZIPped
  178. CCS64 into), you'll have to navigate
  179. there. On my own PC it is located in
  180. "C:{CBM--}Program Files{CBM--}CCS64{CBM-*}32". Hit ENTER
  181. on a directory name to go down into
  182. it. Hit ENTER on ".." to go up one
  183. directory level. Hit ENTER on a drive
  184. letter to change to a different active
  185. drive.
  186.  
  187.     Inside the CCS64 folder you'll see
  188. the image "CCSMon.crt". Highlight it
  189. and hit ENTER. Now CCS64 restarts the
  190. emulated C-64 with the cartridge
  191. inserted. You'll see the CCSMon
  192. startup screen.
  193.  
  194.     Now remove (un-insert) the
  195. cartridge by pressing ALT-C to return
  196. to the "Cartridge" menu. Use
  197. down-arrow to highlight "Cartridge
  198. Emulation" and right-arrow to select
  199. "Off". Press ESC to return to the
  200. emulated C-64. What the?!? The CCSMon
  201. screen is still displayed! Hit ALT-R
  202. to clear things up.
  203.  
  204.     ALT-R simulates a software reset
  205. like SYS 64738. You can do a
  206. hard-reset using ALT-SHIFT-R.
  207. ALT-SHIFT-R simulates a reset button.
  208. In most cases, just using ALT-R will
  209. work just fine.
  210.  
  211.  
  212. RAM EXPANSION
  213.  
  214.     From here on in I'll assume you're
  215. comfortable with how the CCS64 menus
  216. work and can select functions and
  217. sub-menus on your own. If you have
  218. difficulty, refer to the CCS64 manual.
  219.  
  220.     Another cool feature available
  221. from the "Cartridge" menu is the "RAM
  222. Expansion Unit".  This simulates a
  223. Commodore 17xx REU. Here you can turn
  224. the REU on or off, which is the same
  225. as inserting or removing the REU. You
  226. can also set the size of the REU
  227. anywhere from 128 Kilobytes to 16
  228. Megabytes using the "Size" function.
  229. Imagine what you can do with a 16
  230. Megabyte Commodore 64!
  231.  
  232.     Additionally, the "File Enable"
  233. function allows you to preserve the
  234. contents of the virtual REU between
  235. sessions. When you quit CCS64 (ALT-Q)
  236. the contents will be saved in a file
  237. on your PC hard drive. The next time
  238. you start CCS64, the REU contents will
  239. automatically be reloaded (assuming
  240. you leave "RAM Expansion Unit" set to
  241. "On".)
  242.  
  243.     The cartridge port emulation of
  244. CCS64 is superior to the same port on
  245. a real C-64 in that you can keep the
  246. REU enabled even when using other
  247. cartridges (e.g. CCSMon.) You can
  248. think of this as having a switched
  249. dual cartridge port expander plugged
  250. into the C-64 (similar to the
  251. "Aprospand-64").
  252.  
  253.  
  254. TAPE IMAGES
  255.  
  256.     There are two types of tape images
  257. available for C-64 emulators. They use
  258. different principles, but you don't
  259. have to know the technical details
  260. since both work just as well on CCS.
  261. They are .T64 and .TAP files.
  262.  
  263.     From the CCS main menu (F10)
  264. select "Tape Device 1". Now use the
  265. file listing to navigate to the
  266. drive/directory containing the tape
  267. image file. Select the tape image you
  268. want and press F1 to "Examine" it. CCS
  269. has now inserted the tape into the
  270. virtual tape drive.
  271.  
  272.     Here is something new. Tape images
  273. can contain more than one C-64 program
  274. or data file (just like a real C-64
  275. tape.) The menu displayed at this
  276. point allows you to select a program
  277. from the virtual cassette to LOAD and
  278. RUN it. Highlight the desired program
  279. and press F1. CCS will now reset the
  280. emulated C-64. The command LOAD "",1
  281. will automatically be entered. In a
  282. short amount of time the program will
  283. have loaded and it will automatically
  284. RUN.
  285.  
  286.  
  287. PROGRAM IMAGES
  288.  
  289.     A program image is simply a C-64
  290. program as it exists in the C-64's
  291. memory. Typically this will be a BASIC
  292. program, or a machine language program
  293. with a BASIC startup (e.g. 10 SYS
  294. 2061.) These files are identified by
  295. their .PRG extension.
  296.  
  297.     You can make a .PRG image file by
  298. SAVEing a BASIC program to disk and
  299. copying the resulting file to a PC
  300. formatted disk. Then rename it with a
  301. .PRG extension. Note that this is the
  302. same procedure used to make a .ROM
  303. image file. The only difference is
  304. that .PRG files ALWAYS should have a
  305. LOAD address of $0801.
  306.  
  307.     You can LOAD and RUN .PRG images
  308. using the same procedure as for tape
  309. images, right from the "Tape Device 1"
  310. menu.
  311.  
  312.  
  313. DISK IMAGES
  314.  
  315.     Disk images are a byte for byte
  316. image of a 1541 floppy disk. They come
  317. in a few flavors, but the most common
  318. is .D64. You'll also run across .X64
  319. and .G64. The latter is a GCR image of
  320. the disk containing not only the data
  321. blocks but also the header block and
  322. low-level formatting info.
  323.  
  324.     From the C-64 screen, hit ALT-8 to
  325. go to the file select menu for "1541
  326. Device 8". Navigate to the
  327. drive/directory containing the disk
  328. image file you're interested in and
  329. highlight it. Press F1 to "Examine"
  330. the disk image and see it's directory.
  331. This is equivalent of LOAD "$",8 LIST.
  332. Now highlight a PRoGram file and hit
  333. ENTER to RUN it.
  334.  
  335.     Because many disk image files
  336. contain only one program and are
  337. mostly wasted space, they are often
  338. distributed in a compressed format.
  339. The two most common formats are
  340. PK-ZIPed (.ZIP) and "Zip-Coder 64"
  341. (.Z64)
  342.  
  343.     .ZIP files must be unpacked with
  344. PK-ZIP or WinZip before you can use
  345. them with your emulator. This is the
  346. preferred method of distribution for
  347. .D64 images.
  348.  
  349.     "Zip-Coder" is a C-64 program
  350. which has been around a LONG time. It
  351. was used to distribute copies of
  352. entire disk sides on the many
  353. Commodore bulletin boards of old.
  354. "Zip-Coder" files are NOT ALWAYS
  355. designated with the .Z64 extension.
  356. You can ALWAYS identify them by the
  357. form they take in the 1541 directory:
  358.  
  359.     1!name.Z64 PRG
  360.     2!name.Z64 PRG
  361.     3!name.Z64 PRG
  362.     4!name.Z64 PRG
  363.  
  364. "Zip-Coder" works by reading each
  365. block of a 1541 disk side. The blocks
  366. are lightly compressed using a simple
  367. RLE (Run-Length Encoding) algorithm
  368. and then divided into four zones. The
  369. zones are defined by the track range
  370. wherein each given block exists. The
  371. size of each of the 1! - 4! files
  372. depends on the number of used blocks
  373. in that zone.
  374.  
  375.     The four files should be
  376. distributed together. Sometimes they
  377. will be found further packed into
  378. PK-ZIP archives. This two-level
  379. archive means you only have to
  380. download one file, but it is NOT the
  381. best way. It is FAR LESS COMPLICATED
  382. to compress a .D64 image into a .ZIP
  383. archive with PK-ZIP/WinZip. This saves
  384. the user from having to unpack two
  385. levels of archives.
  386.  
  387.     Several versions of Zip-Coder are
  388. floating around. Most use the same
  389. pack/unpack algorithm and their output
  390. files are interchangeable. A good one
  391. can be gotten from:
  392.  
  393.   ftp://arnold.c64.org/pub/ut
  394.   ils/c64apps/zippers/
  395.  
  396.     A good way to eliminate the
  397. complexities of dealing with archives
  398. (especially those nasty two-level
  399. archives) is by installing "Target
  400. D64" by Karlheinz Langguth. It can be
  401. gotten from :
  402.  
  403.   http://skyscraper.fortunecity.com/
  404.   quadra/251/targetd64.html
  405.  
  406.     "Target D64" is a PC program which
  407. automatically unpacks the most common
  408. archives used with C-64 image files.
  409. It will start your emulator and
  410. hand-off the resultant image to it. I
  411. use "Target D64" to start .ZIP and
  412. .Z64 compressed images with its "Send
  413. To" context menu. Installing "Target
  414. D64" may require you to edit your PC's
  415. "AUTOEXEC.BAT" file, but all the
  416. details are thoroughly described in
  417. its instructions. Sorry but PC
  418. programs are not nearly as easy to
  419. install and operate as C-64 programs
  420. ;')
  421.  
  422.     Again, see  "FORMATS.ZIP" by Peter
  423. Schepers for the details of the most
  424. common disk image and archive formats.
  425.  
  426.  
  427. JOYSTICKS
  428.  
  429.     Like the other hardware commonly
  430. found on C-64 systems, the joysticks
  431. must be emulated. The easiest joystick
  432. setup available under CCS64 is the
  433. predefined joystick keysets. They work
  434. by intercepting keypresses on the PC
  435. keyboard and passing them to the
  436. emulated C-64 as actions on a joystick
  437. connected to port 1 or port 2.
  438.  
  439.     Enter the "Input" menu with ALT-I.
  440. Highlight the "Control Port 1"
  441. function and use left-arrow/ right-
  442. arrow to select the "Joystick"
  443. setting. Notice that its also possible
  444. to connect a virtual mouse and virtual
  445. paddles to the emulated machine.
  446.  
  447.     For now, just select "Joystick".
  448. Now highlight the "Mode" function
  449. corresponding to "Control Port 1" and
  450. select the "Keyset 1" setting. Next,
  451. do the same operations for "Control
  452. Port 2" but select the "Keyset 2"
  453. setting for the "Control Port 2"
  454. "Mode" function.
  455.  
  456.     View the definitions for each
  457. keyset by highlighting the "Define
  458. Joystick Keyset" function and pressing
  459. right-arrow. Use the "Define Joystick
  460. Keyset" menu to view the key
  461. definitions for "Keyset 1" and "Keyset
  462. 2". Later you can re-define the
  463. keysets to your liking, but don't
  464. change them at this time. The default
  465. joystick keyset definitions are:
  466.  
  467. Keyset 1
  468.   Up = /
  469.   Down = 5
  470.   Left = 7
  471.   Right = 9
  472.   Fire = right ALT
  473.  
  474. Keyset 2
  475.   Up = 8
  476.   Down = 2
  477.   Left = 4
  478.   Right = 6
  479.   Fire = right CTRL
  480.  
  481.     These refer to the numeric keypad
  482. on the PC keyboard. You'll see that
  483. the default keysets are very intuitive
  484. as long as you have set the "Control
  485. Port 1" function to "Keyset 1" and the
  486. "Control Port 2" function to "Keyset
  487. 2". The default keysets don't work
  488. well for games requiring 2 joysticks
  489. and you'll want to use different
  490. "Mode" settings for these games.
  491.  
  492.     It is also possible to use a PC
  493. joystick or real C-64/Atari joystick
  494. which has been modified to connect to
  495. the PC. If you have such hardware,
  496. just select the corresponding Mode
  497. setting in the Control Port used by
  498. your game. The plans for such a hack
  499. may be found at:
  500.  
  501. http://www.students.tut.fi/^kosolah
  502. /joyport/joyport-en.html
  503.  
  504.  K"PD"K
  505.  
  506.  
  507.