home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Select: Games 3
/
cd.iso
/
games
/
c64
/
c64-emul
/
c64tech.doc
< prev
next >
Wrap
Text File
|
1993-08-25
|
7KB
|
188 lines
C64S - Commodore 64 Software Emulator
(C) 1991-1993 Miha Peternel
Unofficial Technical Information
This is unofficial technical information on my C64 emulator.
Feel free to ask further questions and comment possible changes,
especially if you are/were a C64 hacker.
WHAT'S THIS ?
C64S is a software emulator of Commodore 64. My aim is to make a 100%
emulation of C64. At the moment it requires 286 (or higher), a PC or
100% compatible with 640K of RAM and VGA. If you don't like the beeper
noise, a Sound Blaster helps a lot.
THE FACTS:
Emulator offers:
- 6510 CPU emulation
- VIC emulation on a VGA (320*200*16 at the moment, X-mode in the near
future - CAN YOU HELP?)
- SID emulation on a PC speaker or Sound Blaster (That sounds COOL!)
- C64 keyboard emulation with some replacements and some enhancements
(PC cursor up is like C64 shift + cursor up, Ctrl-Alt-Del is normal
reset, Ctrl-Alt-Ins is brutal reset - resets everything!)
- 1541 disk drive emulation (uses original 1541 ROM and PC files for
disk images, I have done software for serial transfer of whole C64
disks to PC)
- C64 tape emulation (uses PC files for images - 1 file for a tape with
a header and directory, my magic software and simple connector allow
me to read C64 Turbo Tape files directly from PC!)
- CIA timers work, but need major enhancements
CAN I BE MORE SPECIFIC ?
6510 CPU
Runs in real mode, 286 and 386 optimized versions available.
- legal instruction set operates 100%
- illegal instructions operate partially and need to be reprogrammed
and optimized due to major enhancements in the emulator
- $01 MMU works 100%
- IRQ, NMI and RESET redirections ok
- the cycles are not yet counted correctly (that's what I do now,
so the rasters dependent on CPU speed will look OK)
- speed limitation not yet implemented
VIC
The screen is updated 8 raster lines at a time to provide the highest
speed but makes some effects look ugly. Line by line update is my
priority at the moment. The screen refresh speed can be slowed down to
increase emulation speed on slow machines.
Implementation:
- text modes - normal and multicolor
- graphic modes - hires and multicolor
- blank screen
- sprites: normal, expanded, multicolor, more than 8 sprites just like
on a real C64, sprite/sprite priority ok, sprite/background priority
ok, sprite collision works 90% (it's a bug)
- hardware soft scroll, allowing to move bad lines 8 raster lines down
- shrunk screen
- raster interrupts using $D011 and $D012 make possible to split screen,
show more than 8 sprites, provide timing...
- border sprites and expanded screen can't run on 320*200 (I must turn
an X-mode on)
SID
Sound is synthesized at 8 KHz (max C64 frequence is below 4 KHz). SB
output is at 8 KHz, speaker output is doubled (16 KHz) to prevent
base frequency noise. Anyway, the music sounds really cool, but you need
a fast machine (386-40 or 486-33 MHz) to gain original speed.
Implementation:
- all 3 channels
- sampled original amplitudes
- original envelope timings
- volume control
- pulse width modulation
but:
- no filters
- no channel to channel connection yet
- no channel 3 output registers (coming soon)
CIA 1,2
Keyboard emulation is 100%. Cursor keys emulate joystick(s) - PC joystick
routines are nearly done. Timer A works OK. Timer B is a question of time.
Day-clock timer works 50%, because I still haven't program some control
registers. CIA 2 is only partially emulated: it provides only VIC page
selection and NMI flag. Further enhancements on the way.
1541 disk drive
Emulator uses original VIC 1541 disk drive ROM, which allows to fully
emulate disk drive operations. However, PC floppy units suck, so the
disk contents is placed in a file containing original floppy image.
C64 to PC goes via serial link (a whole disk at a time). In the
registered version the emulator will allow multiple disk images and
a nice selection screen.
C64 tapes
Same as disks, the tape files are placed in a PC file which contains
a header and directory to allow multiple C64 files to be placed in one
PC file. C64 tape to PC goes directly using a simple connector plugged
in to the parallel or printer port. Multiple tape files are supported.
Tape and file selection is done by a built-in menu. Registered version
will include Tape Tools to manage C64 tapes on PC and Turbo Tape to
read C64 tapes directly - a connector is really simple - this is the
fastest way to transfer files. You can speed up your tape and PC Turbo
will still be able to read it.
TESTED PROGRAMS:
- Turbo Assembler, ok
- Monitor 49152, 32768..., ok
- BASIC, ok
TESTED GAMES:
- Cybernoid II, ok
- Krakout I, II, ok
- Out Run, ok
- Boulder Dash, 99%
- Spy vs. Spy, ok
- Commando, 99%
- Green Beret, ok
- Dark Side, ok
- lots and lots more - 90% out of 60 tested work ok
RELEASE:
C64S09A.ARJ will be sent to a FTP near you this week ! Check it !
It has still some bugs and it fails to work on old slow 386
machines (an exception occurs !?).
FINAL 1.0 VERSION:
The emulator (called C64S) has been under construction for more than
2 years now, the source is 200K 100% assembler. The final version
will be 386 only, though I also have a 286 version now !
It will be released as SHAREWARE ($20) allowing some nice goodies in
the registered version:
Tape Tools (to handle C64 tape images on PC), Turbo Tape (reads C64
tapes directly from your PC with a simple connector)...
BACK TO THE FUTURE:
The 1.0 release will be launched in November, because I live in
Slovenia, but I came to Colorado for 2 months to work at HP. That
means all my literature is at home, only the sources are here.
The main enhancements in sight for now:
- line by line screen update to make the intros look better
- CPU cycle counter (specific for NTSC and PAL)
- CIA enhancements
Till the end of the year:
- VGA X-mode to allow full screen graphics
- 386 protected mode to increase performance
HELP !
I desperately need some information on X-modes and protected mode.
CAN YOU HELP ME ?
CONTACTS:
My home address: (October 3rd 1993...)
Miha Peternel
Pot v Bitnje 66
64000 Kranj
Slovenia, Europe
Phone/Fax/Modem: +386-4-311-959
USA address: (...October 3rd 1993)
Miha Peternel
2500 Flintridge Place
Fort Collins
Colorado 80521, USA
Phone: +1-303-229-3670
E-mail: miha@cnd.hp.com