Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 09-Oct-2018 | - | ||||
README.md | H A D | 26-Apr-2018 | 2.8 KiB | 69 | 53 | |
bifrost2dem.c | H A D | 26-Apr-2018 | 3.5 KiB | 150 | 106 | |
ctile.asm | H A D | 26-Apr-2018 | 74 | 8 | 4 |
README.md
1# ZX SPECTRUM BIFROST*2 DEMO 2[Game Engine Author's Website](https://www.ime.usp.br/~einar/bifrost/) 3[Original Documentation](https://github.com/z88dk/z88dk/tree/master/libsrc/_DEVELOPMENT/arch/zx/bifrost2) 4[Plain Header File in Z88DK](https://github.com/z88dk/z88dk/blob/master/include/_DEVELOPMENT/clang/arch/zx/bifrost2.h) 5 6Before using Bifrost*2, it should be configured. 7 8The default configuration is: 9 10* Animation size: 2 or 4 frames per animation group 11 `defc __BIFROST2_ANIM_GROUP = 4` 12* First non-animated frame 13 `defc __BIFROST2_STATIC_MIN = 128` 14* Value subtracted from non-animated frames 15 `defc __BIFROST2_STATIC_OVERLAP = 128` 16* Default location of multicolor tiles table (16x16 pixels, 64 bytes per tile) 17 `defc __BIFROST2_TILE_IMAGES = 49000` 18* Tile rendering order (1 for sequential, 7 or 9 for distributed) 19 `defc __BIFROST2_TILE_ORDER = 7` 20* Location of the tile map (11x10=110 tiles) 21 `defc __BIFROST2_TILE_MAP = 65281` 22* Number of char rows rendered in multicolor (3-22) 23 `define(\`__BIFROST2_TOTAL_ROWS', 22)` 24 25This program assumes the default configuration so nothing needs to be done to configure the engine prior to compiling. 26 27## Bifrost*2 Configuration 28 29However in other circumstances, the bifrost*2 target configuration file should be edited to change the settings 30("z88dk/libsrc/_DEVELOPMENT/target/zx/config_bifrost_2.m4") and then the zx library should be rebuilt by running: 31 32`Winmake zx` (windows) 33`make TARGET=zx` (other) 34 35from the "z88dk/libsrc/_DEVELOPMENT" directory. 36 37## Compile the Demo 38 39This program can be compiled as follows: 40 411. SCCZ80 + New C Library 42``` 43zcc +zx -vn -startup=1 -clib=new bifrost2dem.c ctile.asm -o bifrost2dem 44appmake +zx -b bifrost2dem_BIFROST2.bin -o bifrost2.tap --noloader --org 51625 --blockname BIFROST2 45appmake +zx -b bifrost2dem_CODE.bin -o bifrost2dem.tap --noloader --org 32768 --blockname bifrost2dm 46copy /b loader.tap + bifrost2.tap + bifrost2dem.tap demo.tap 47``` 482. ZSDCC + New C Library 49``` 50zcc +zx -vn -SO3 -startup=1 -clib=sdcc_iy --max-allocs-per-node200000 bifrost2dem.c ctile.asm -o bifrost2dem 51appmake +zx -b bifrost2dem_BIFROST2.bin -o bifrost2.tap --noloader --org 51625 --blockname BIFROST2 52appmake +zx -b bifrost2dem_CODE.bin -o bifrost2dem.tap --noloader --org 32768 --blockname bifrost2dm 53copy /b loader.tap + bifrost2.tap + bifrost2dem.tap demo.tap 54``` 55After compiling, the binaries "bifrost2dem_CODE.bin" (containing the program) and "bifrost2dem_BIFROST2.bin" (containing the bifrost*2 engine) are produced. 56 57Appmake is run to turn those into CODE-only tap files. 58 59Windows "copy" is used to append those taps to the end of "loader.tap" to form the final tap file "demo.tap" 60 61"loader.tap" contains this basic loader: 62 63``` 6410 CLEAR VAL "32767" 6520 LOAD "BIFROST2"CODE 6630 LOAD ""CODE 6740 RANDOMIZE USR VAL "32768" 68``` 69