Yay, 3 free days. That's enough for anime, boozing and c64! So I finally managed to release something:
DLoad MMC example
This short example shows the integration of DLoad into an existing project and the generation of a dfi image for MMC64.
Don't worry, I won't use Elvira as an example again. A bit more action was requested, and I think I found a candidate:
'Sly Spy' (or 'Secret Agent' as the title screen says). It's a nice old game which I converted from tape to disk some time ago
(hey wait, that's already 11 years!).
Contents
(All files are in 'Uploads')
--
files have now moved to Files/MMC64 section! //RaveGuru
- build_script.tar.gz
Example script for a build on a linux system.
- build_script.zip
Example batchfile for a build on a dos/win system.
- cbmconvert-2.1.2_dfi.diff.gz
cbmconvert-2.1.2_dfi.tar.gz
cbmconvert-2.1.2_dfi_dos.zip
A patched version of cbmconvert which can write dfi files. '*.diff.gz' is the patch file for the original archive 'cbmconvert-2.1.2.tar.gz' from
http://www.zimmers.net/anonftp/pub/cbm/crossplatform/converters/unix/index.html. '*.tar.gz' is the complete sourcecode and '*dos.zip' is the
precompiled executable for dos/windows.
- dfiplgin_bin_20060501.zip
dfiplgin_src_20060501.zip
Source and binary of the dfi plugin. Please note that the image browser is a separate project, the source can be found in the 'mylene_src_20060501.zip' archive.
- dload_dfi_demos_20060501.zip
All dfi examples which come with dload. Take a look at the dload_src archive for the sources. Please install the new dfiplgin before you try them.
- dload_src_20060430.rar
The latest DLoad version including MMC64 support.
- dreamass_doc_20060501.rar
dreamass_dos_20060501.rar
dreamass_src_20060501.rar
DreamAss is a portable crossassembler. It builds all the C64 code in this release pack.
- mmc64_plugin_src_20060501.zip
A new version of the mmc64 plugin. A small bug in the 'MMC64Plugin_InitKernel' routine was fixed: some zp locations were initialized with wrong values.
- mylene_src_20060501.zip
A file browser library. It can be configured to display various information and supports caching. Mylene is used in the dfi and lnx plugins for the MMC64.
- sly_spy.zip
The old kernel-loader version of 'sly spy'.
- sly_spy_mmc_20060501.zip
Sources, scripts and dload.cfg for the DLoad version of the game.
- slyspy_dfi.zip
The prebuild dfi image, ready to play. Don't forget to install the new dfiplgin!
The GameBefore we start, we need some information about the game (like where is free mem for the code):
- The loader lives at $0400, a call to $0404 loads the first level, $0407 loads the next level
- $0340 - $0800 is free for our new loader code.
- $cf00 - $e000 is also not used, $cf00-$d000 is a nice buffer for dload
- The game consists of 13 'levels', named '0' to 'b'. The first level is the title screen.
Each level consists of several files, which all start with the same digit ('0'-'b').
This makes the game perfect for levelpacking. I will use exomizer for this.
The loader configDLoad consists of 2 parts: the installer and the loader.
The installer determines the drivetype, downloads the specific code to the drive and copies
the according loader code to a location in the c64 ram. The installer is quite big as it
contains code for all drivetypes, c64 and drive side. The installer can be executed before
your main program is depacked and you still have some space left.
The loader is copied by the installer to it's destination in the c64 ram. It uses only a few
zeropage locations, and - depending on the drive type - up to $0200 bytes for code. The loader
also needs $0100 bytes for it's sector buffer. This buffer should be page aligned.
The loader can be assembled with 2 different interfaces. The standard 'LoadFile/LoadTS' interface
provides functions to load a complete file or a single sector. The 'Open/Get' interface provides
a function to open a file and one to get a singe byte from it. This is very useful for leveldepacking
and thus the interface we choose for sly spy.
We need to build DLoad with these options:
Next we assign some zeropage locations for the loader:
The complete config file 'dload.cfg' can be found in the 'sly_spy_mmc_20060501.zip' archive. It is used to build the loader.
For a quickstart I provided a script for linux and windows, which takes care of all the compiling, assembling and levelpacking.
Just follow the instructions for your system and you should get a 'slyspy.dfi: in no time. :)
DOS/WindowsRequirements:
- something to extract 'rar' and 'zip' files, like 7zip (<http://www.7-zip.org/>)
- Download the following files from the forum to a work directory. I use 'C:\work' in this example.
Code:
build_script.zip
cbmconvert-2.1.2_dfi_dos.zip
dload_src_20060430.rar
dreamass_dos_20060501.rar
sly_spy.zip
sly_spy_mmc_20060501.zip
- Download exomizer 1.1.5 to your work directory:
http://web.comhem.se/~u13114991/exo/exomizer115.zip
- Extract all archives. Your working directory should look like this now:
Code:
C:\work>dir
Datenträger in Laufwerk C: BERILLIA
Seriennummer des Datenträgers: 064D-1708
Verzeichnis von C:\work
. <DIR> 23.03.06 0:33 .
.. <DIR> 23.03.06 0:33 ..
BUILD BAT 2.561 01.05.06 17:11 build.bat
CBMCON~1 EXE 160.256 30.04.06 20:08 cbmconvert.exe
CBMCON~1 TXT 7.873 23.04.06 12:24 cbmconvert.txt
DLOAD <DIR> 01.05.06 15:15 dload
DREAMASS <DIR> 01.05.06 15:15 dreamass
CHANGE~1 TXT 12.714 03.10.04 20:43 changelog.txt
CONTRIB <DIR> 01.05.06 15:15 contrib
DECRUN~1 <DIR> 01.05.06 15:15 decruncher
DOS <DIR> 01.05.06 15:15 dos
EXOBAS~1 TXT 2.606 26.09.04 16:55 exobasic10b2.txt
EXOMIZ~1 TXT 14.039 01.09.04 7:04 exomizer115.txt
EXOMIZ~2 ZIP 63.752 26.09.04 16:59 exomizer115src.zip
LINUX <DIR> 01.05.06 15:15 linux
WIN32 <DIR> 01.05.06 15:15 win32
SLY_SPY <DIR> 01.05.06 15:15 sly_spy
7 Datei(en) 263.801 Bytes
10 Verzeichnis(se) 139.862.016 Bytes frei
- Run the build script:
Code:
C:\work>build
- That's it, you should have a working 'slyspy.dfi' image in the 'sly_spy' directory now.
LinuxRequirements:
- standard tools like 'tar', 'cat' etc.
- gcc
- make
- unzip
- rar
- Download the following files from the forum to a work directory. I use '/tmp/dload_workdir' in this example.
Code:
build_script.tar.gz
cbmconvert-2.1.2_dfi.tar.gz
dload_src_20060430.rar
dreamass_src_20060501.rar
sly_spy.zip
sly_spy_mmc_20060501.zip
- Download exomizer 1.1.5 to your work directory:
http://web.comhem.se/~u13114991/exo/exomizer115.zip
- The work directory should look like this now:
Code:
baccy@Yakumo ~ % ls /tmp/dload_workdir -1
build_script.tar.gz
cbmconvert-2.1.2_dfi.tar.gz
dload_src_20060430.rar
dreamass_src_20060501.rar
exomizer115.zip
sly_spy.zip
sly_spy_mmc_20060501.zip
- Change to your work directory and extract the build script:
Code:
baccy@Yakumo ~ % cd /tmp/dload_workdir
baccy@Yakumo /tmp/dload_workdir % tar fxz build_script.tar.gz
- Execute the build script:
Code:
baccy@Yakumo /tmp/dload_workdir % ./build
- That's it, you should have a working 'slyspy.dfi' image in the 'sly_spy' directory now.
The last output of the script shows the image:
Code:
-rw-r--r-- 1 baccy baccy 262144 May 1 15:58 sly_spy/slyspy.dfi
Other Platforms
You hacked the project for another platform? Please let me know, especially if you needed you change some sources.