Jump to content

Photo

D.K. VCS Source


No replies to this topic

#1 Joe Musashi OFFLINE  

Joe Musashi

    Moonsweeper

  • 310 posts

Posted Sun Mar 4, 2018 9:08 AM

To celebrate the first anniversary of the 1.0 release of D.K. VCS, I am happy to now release the game source code. It can be downloaded from:

    https://drive.google...0FQ0TnQRpNt21xw

Please note that this is a complete archive of the project. It not only contains the assembly code, it also includes a lot of other stuff that was used during development. For example, there’s a GarageBand project, which was created to help arranging the music.

Building

You should be able to build the binary on the command line with DASM with:
 

dasm dk.asm -odk.bin -f3

 
Alternatively, on Linux and Mac (or Cygwin on Windows) you can run the included makefile. You just have to edit the paths at the top of the file. It should be noted that the makefile also compiles the tool that generates the boot message. So you will have to have gcc or another C++ compiler installed.

Using the makefile you can just run:
 

make

 
or to generate both PAL and NTSC binaries:
 

make release

 
There’s also a special target which generates a cartridge version. The cartridge version differs in a way that it can contain a special message in the unused ROM space that overlaps the SARA RAM. In order to build it, type:
 

make cart

 
Source

The source consists of dk.asm as main file, while bank_0.asm to bank_7.asm generate the code for the eight 4K banks. Also, there are a number of includes such as the color conversion tables and the font.

One thing that might be useful is libvcs.asm. It is a collection of functions that are frequently used in my projects and have thus been folded into a separate library. There’s a wide variety of functions, including display handling, memory operations, sprite kernels and positioning code, score routines, a RNG, a sound FX player, and a music player. All routines can either be inserted as inline code, e.g.,
 

VERTICAL_SYNC

 
or as subroutines
 

FUNC_VerticalSync

 
You can see how these are included and called in the DK code. A simple example is the standalone title which can be found in Title/dk.asm.

Have Fun!






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users