├── .gitignore ├── .vscode ├── extensions.json ├── settings.json └── tasks.json ├── README.md ├── asm ├── LICENSE ├── PyramidWarp.annotated.asm ├── PyramidWarp.enhanced.asm ├── PyramidWarp.enhancedplus.asm ├── enhanced │ ├── LICENSE │ ├── charset.png │ ├── charset.png.chr │ ├── charset.png.clr │ ├── charset_0.png │ ├── charset_0.png.chr │ ├── charset_0.png.clr │ ├── font.png │ ├── font.png.chr │ ├── font.png.clr │ ├── sprites.png │ ├── sprites.png.spr │ ├── sprites4d.png │ └── sprites4d.png.spr ├── enhancedplus │ ├── LICENSE │ ├── charset.png.chr │ ├── charset.png.chr.zx0 │ ├── charset.png.clr │ ├── charset.png.clr.zx0 │ ├── charset_extra.png │ ├── charset_extra.png.chr │ ├── charset_extra.png.clr │ ├── charset_font.png │ ├── charset_font.png.chr │ ├── charset_font.png.clr │ ├── charset_ingame.png │ ├── charset_ingame.png.chr │ ├── charset_ingame.png.clr │ ├── etc │ │ └── pyramidwarpEX_wall_desc.xlsx │ ├── init.asm │ ├── init.bin │ ├── init.bin.zx0 │ ├── mapper │ │ ├── LICENSE │ │ ├── pyramidwarpEXmapper.exe │ │ ├── rooms.asm │ │ ├── rooms_original.asm │ │ └── tileset_map.png │ ├── pyramids.asm │ ├── screen_charset.png │ ├── screen_ingame.tmx │ ├── screen_ingame.tmx.bin.zx0 │ ├── screen_title.tmx │ ├── screen_title.tmx.bin.zx0 │ ├── sfx │ │ ├── LICENSE │ │ ├── PW_Dead2.pt3 │ │ ├── PW_Dead2.pt3.hl │ │ ├── PW_Dead2.pt3.hl.zx0 │ │ ├── PW_LevelFinished.pt3 │ │ ├── PW_LevelFinished.pt3.hl │ │ ├── PW_LevelFinished.pt3.hl.zx0 │ │ ├── PW_NewGame.pt3 │ │ ├── PW_NewGame.pt3.hl │ │ ├── PW_NewGame.pt3.hl.zx0 │ │ ├── PW_Sphinx_IN.pt3 │ │ ├── PW_Sphinx_IN.pt3.hl │ │ ├── PW_Sphinx_IN.pt3.hl.zx0 │ │ ├── PW_Sphinx_IN2.pt3 │ │ ├── PW_Sphinx_IN2.pt3.hl │ │ ├── PW_Sphinx_IN2.pt3.hl.zx0 │ │ ├── PW_Sphinx_OUT.pt3 │ │ ├── PW_Sphinx_OUT.pt3.hl │ │ ├── PW_Sphinx_OUT.pt3.hl.zx0 │ │ ├── PW_level1_A.pt3 │ │ ├── PW_level1_A.pt3.hl │ │ ├── PW_level1_A.pt3.hl.zx0 │ │ ├── PW_level1_B.pt3 │ │ ├── PW_level1_B.pt3.hl │ │ ├── PW_level1_B.pt3.hl.zx0 │ │ ├── PW_level1_C.pt3 │ │ ├── PW_level1_C.pt3.hl │ │ ├── PW_level1_C.pt3.hl.zx0 │ │ ├── PW_level1_ONLY_FIRST_TIME.pt3 │ │ ├── PW_level1_ONLY_FIRST_TIME.pt3.hl │ │ ├── PW_level1_ONLY_FIRST_TIME.pt3.hl.zx0 │ │ ├── PW_level2_A.pt3 │ │ ├── PW_level2_A.pt3.hl │ │ ├── PW_level2_A.pt3.hl.zx0 │ │ ├── PW_level2_B.pt3 │ │ ├── PW_level2_B.pt3.hl │ │ ├── PW_level2_B.pt3.hl.zx0 │ │ ├── PW_level2_C.pt3 │ │ ├── PW_level2_C.pt3.hl │ │ ├── PW_level2_C.pt3.hl.zx0 │ │ ├── PW_level3_A.pt3 │ │ ├── PW_level3_A.pt3.hl │ │ ├── PW_level3_A.pt3.hl.zx0 │ │ ├── PW_level3_B.pt3 │ │ ├── PW_level3_B.pt3.hl │ │ ├── PW_level3_B.pt3.hl.zx0 │ │ ├── PW_level3_C.pt3 │ │ ├── PW_level3_C.pt3.hl │ │ ├── PW_level3_C.pt3.hl.zx0 │ │ └── headerless.asm │ ├── sprites.png │ ├── sprites.png.spr.zx0 │ └── test.afb ├── libext │ ├── PT3-RAM.tniasm.ASM │ ├── PT3-ROM.tniasm.ASM │ ├── ayFX-RAM.tniasm.ASM │ ├── ayFX-ROM.tniasm.ASM │ ├── dzx0_standard.asm │ ├── readme.txt │ └── vt.bin ├── original │ ├── LICENSE │ ├── charset.png │ ├── charset.png.chr │ ├── charset.png.clr │ ├── font.png │ ├── font.png.chr │ ├── font.png.clr │ ├── pyramids.asm │ ├── rooms.asm │ ├── sprites.png │ └── sprites.png.spr └── symbols.asm ├── bin ├── pcxtools.md ├── tniasm.txt └── yazd.md ├── disassemble.bat ├── makefile ├── reassemble.bat └── rom ├── PyramidWarp.asm ├── PyramidWarp.enhanced.rom ├── PyramidWarp.enhancedplus.rom ├── PyramidWarp.rom.md5 └── PyramidWarp.yazd /.gitignore: -------------------------------------------------------------------------------- 1 | tniasm.out 2 | tniasm.sym 3 | tniasm.tmp 4 | rom/PyramidWarp.original.rom 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | 5 | // List of extensions which should be recommended for users of this workspace. 6 | "recommendations": [ 7 | "mborik.z80-macroasm", 8 | "theNestruo.z80-asm-meter", 9 | "nurpax.bitmate" 10 | ], 11 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace. 12 | "unwantedRecommendations": [ 13 | 14 | ] 15 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.insertSpaces": false, 3 | "editor.minimap.maxColumn": 80, 4 | "editor.tabSize": 8, 5 | "editor.rulers": [ 6 | 80 7 | ], 8 | "files.associations": { 9 | "*.makefile": "makefile", 10 | "makefile.*": "makefile" 11 | }, 12 | "files.exclude": { 13 | "tniasm.out": true, 14 | "tniasm.sym": true, 15 | "tniasm.tmp": true, 16 | "**/*.bin": { "when": "$(basename)" }, 17 | "**/*.chr": { "when": "$(basename)" }, 18 | "**/*.clr": { "when": "$(basename)" }, 19 | "**/*.hl": { "when": "$(basename)" }, 20 | "**/*.nam": { "when": "$(basename)" }, 21 | "**/*.spr": { "when": "$(basename)" }, 22 | "**/*.zx0": { "when": "$(basename)" }, 23 | }, 24 | "z80-asm-meter.platform": "msx" 25 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "presentation": { 6 | "echo": true, 7 | "reveal": "never", 8 | "focus": false, 9 | "panel": "shared", 10 | "showReuseMessage": true, 11 | "clear": false 12 | }, 13 | "problemMatcher": [ 14 | "$errmatcher-tniasm", 15 | "$errmatcher-tniasm-preprocessor" 16 | ], 17 | "tasks": [{ 18 | "label": "make clean enhanced+", 19 | "type": "shell", 20 | "command": "mingw32-make clean compile", 21 | "group": "build" 22 | }, { 23 | "label": "make enhanced+ and test (default)", 24 | "type": "shell", 25 | "command": "mingw32-make test", 26 | "group": { 27 | "kind": "build", 28 | "isDefault": true 29 | } 30 | }, { 31 | "label": "run mdl", 32 | "type": "shell", 33 | "command": "java -jar C:\\dev\\github\\mdlz80optimizer\\target\\mdl-0.9-jar-with-dependencies.jar -dialect tniasm -warn-off-unofficial -I . asm\\PyramidWarp.enhancedplus.asm -po -popotential", 34 | "group": "build", 35 | "problemMatcher": { 36 | "applyTo": "allDocuments", 37 | "fileLocation": [ 38 | "autodetect", 39 | "${workspaceFolder}" 40 | ], 41 | "pattern": [ 42 | { 43 | "regexp": "^(\\w+): Pattern-based optimization in (.+)#([0-9]+): (.+)$", 44 | "file": 2, 45 | "line": 3, 46 | "severity": 1, 47 | "message": 4 48 | } 49 | ] 50 | } 51 | }] 52 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # msx-pyramidwarpex 2 | 3 | Disassembly, reverse engineering, and possible enhancement of the MSX game cartridge "Pyramid Warp (1983)" 4 | 5 | 6 | ## Versions: 7 | 8 | * `PyramidWarp.annotated.asm`: 9 | * The annotated disassembly of Pyramid Warp (1983). 10 | * Assembles to the original ROM, verbatim. 11 | 12 | * `PyramidWarp.enhanced.asm`: 13 | * The original source code, once disassembled, was easy to understand and easy to improve because it used no compression, did no clever tricks, and underused some resources (e.g.: the game looked like SCREEN 1 despite being SCREEN2 already). 14 | * This is a patcheable version of the original source code that allows several of those enhancements. 15 | * This version keeps most of the original source code untouched and, actually, a pixel-perfect clone of the original game can be assembled from this! 16 | 17 | * `PyramidWarp.enhanced+.asm`: 18 | * This version break ties with the original source code wherever necessary to accomodate not-so-easy-to-fit enhancements (such as a proper music replayer or a sprite flickering routine) 19 | 20 | 21 | ## Enhancements 22 | 23 | ### Original enhancements by theNestruo 24 | 25 | * Moved RAM start from $C000 to $E000 (RAM requirement is now 8KB) 26 | * Unused data removed. Data realigned to simplify routines and to free space (+512 bytes freed) 27 | * Disabled keyboard click sound 28 | * Player starts looking down instead of up (simply because it looks better) 29 | * Numbers in scoreboard aligned right to improve readability 30 | * Patcheable colors (symbolic constants in assembly code) 31 | * Patcheable graphics (external binaries for font, charset and sprites) 32 | * Patcheable room definitions (external assembly code) 33 | * 5th and 6th enemy slots can be enabled 34 | 35 | ### Additional enhancements by Nenefranz 36 | 37 | * Completely new graphic set 38 | * Enemies can look in 4 directions 39 | * Enemies sprites can be replaced by player sprites 40 | * A floor tile can be used instead of transparent character 41 | * Numbers in scoreboard in a different color (to improve readability) 42 | * Fixes the first draw of the playground 43 | 44 | ### Additional enhancements 45 | 46 | * Sprite flickering routine 47 | * Proper title charset 48 | * Proper music and sounds! (by Bitcaffe) 49 | * More randomness! Rooms can be mirrored and flipped 50 | * More room definitions! (room editor by Nenefranz) 51 | * Difficulty option! Choose between: easier (3 enemies), original (4 enemies), enhanced (progressive and adaptative number of enemies), and harder (6 enemies). 52 | 53 | 54 | ## Credits 55 | 56 | ### Original game 57 | 58 | * **Pyramid Warp** © 1983 by T&E SOFT 59 | 60 | ### Enhanced versions 61 | 62 | Enhanced versions by Bitcaffe (music), Nenefranz (code & graphics), and theNestruo (code) 63 | 64 | * **Pyramid Warp Enhanced/Enhanced+ code** © 2021 by Nenefranz & theNestruo is licensed under [CC BY-NC-SA 4.0](http://creativecommons.org/licenses/by-nc-sa/4.0/) 65 | 66 | * **Pyramid Warp Enhanced/Enhanced+ graphics** © 2021 by Nenefranz is licensed under [CC BY-NC-ND 4.0](http://creativecommons.org/licenses/by-nc-nd/4.0/) 67 | 68 | * **Pyramid Warp Enhanced+ music** © 2021 by Bitcaffe is licensed under [CC BY-NC-ND 4.0](http://creativecommons.org/licenses/by-nc-nd/4.0/) 69 | 70 | * **Pyramid Warp EX map editor** © 2021 by Nenefranz is licensed under [CC BY-NC-ND 4.0](http://creativecommons.org/licenses/by-nc-nd/4.0/) 71 | 72 | ### External libraries 73 | 74 | * [ayFX Replayer v1.31](http://www.z80st.es/downloads/code/) by SapphiRe 75 | * [PT3 Replayer](http://www.z80st.es/downloads/code/) by Dioniso, MSX-KUN (ROM version), SapphiRe (asMSX version) 76 | * [ZX0](https://github.com/einar-saukas/ZX0) by Einar Saukas 77 | 78 | ### External tools 79 | 80 | * [PCXTOOLS v2.2](https://github.com/theNestruo/pcxtools) coded by theNestruo 81 | * [tniASM v0.45](http://tniasm.tni.nl/) is written by Patriek Lesparre, © 2000-2013 by The New Image 82 | * [Tiled](http://www.mapeditor.org/) © 2008-2020 Thorbjørn Lindeijer 83 | * [ZX0](https://github.com/einar-saukas/ZX0) by Einar Saukas -------------------------------------------------------------------------------- /asm/LICENSE: -------------------------------------------------------------------------------- 1 | Pyramid Warp Enhanced/Enhanced+ code © 2021 by Nenefranz & theNestruo is licensed under CC BY-NC-SA 4.0 -------------------------------------------------------------------------------- /asm/enhanced/LICENSE: -------------------------------------------------------------------------------- 1 | Pyramid Warp Enhanced graphics © 2021 by Nenefranz is licensed under CC BY-NC-ND 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ 2 | -------------------------------------------------------------------------------- /asm/enhanced/charset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/charset.png -------------------------------------------------------------------------------- /asm/enhanced/charset.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/charset.png.chr -------------------------------------------------------------------------------- /asm/enhanced/charset.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/charset.png.clr -------------------------------------------------------------------------------- /asm/enhanced/charset_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/charset_0.png -------------------------------------------------------------------------------- /asm/enhanced/charset_0.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/charset_0.png.chr -------------------------------------------------------------------------------- /asm/enhanced/charset_0.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/charset_0.png.clr -------------------------------------------------------------------------------- /asm/enhanced/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/font.png -------------------------------------------------------------------------------- /asm/enhanced/font.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/font.png.chr -------------------------------------------------------------------------------- /asm/enhanced/font.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/font.png.clr -------------------------------------------------------------------------------- /asm/enhanced/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/sprites.png -------------------------------------------------------------------------------- /asm/enhanced/sprites.png.spr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/sprites.png.spr -------------------------------------------------------------------------------- /asm/enhanced/sprites4d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/sprites4d.png -------------------------------------------------------------------------------- /asm/enhanced/sprites4d.png.spr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhanced/sprites4d.png.spr -------------------------------------------------------------------------------- /asm/enhancedplus/LICENSE: -------------------------------------------------------------------------------- 1 | Pyramid Warp Enhanced+ graphics © 2021 by Nenefranz is licensed under CC BY-NC-ND 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ 2 | -------------------------------------------------------------------------------- /asm/enhancedplus/charset.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset.png.chr -------------------------------------------------------------------------------- /asm/enhancedplus/charset.png.chr.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset.png.chr.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/charset.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset.png.clr -------------------------------------------------------------------------------- /asm/enhancedplus/charset.png.clr.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset.png.clr.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/charset_extra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_extra.png -------------------------------------------------------------------------------- /asm/enhancedplus/charset_extra.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_extra.png.chr -------------------------------------------------------------------------------- /asm/enhancedplus/charset_extra.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_extra.png.clr -------------------------------------------------------------------------------- /asm/enhancedplus/charset_font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_font.png -------------------------------------------------------------------------------- /asm/enhancedplus/charset_font.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_font.png.chr -------------------------------------------------------------------------------- /asm/enhancedplus/charset_font.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_font.png.clr -------------------------------------------------------------------------------- /asm/enhancedplus/charset_ingame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_ingame.png -------------------------------------------------------------------------------- /asm/enhancedplus/charset_ingame.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_ingame.png.chr -------------------------------------------------------------------------------- /asm/enhancedplus/charset_ingame.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/charset_ingame.png.clr -------------------------------------------------------------------------------- /asm/enhancedplus/etc/pyramidwarpEX_wall_desc.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/etc/pyramidwarpEX_wall_desc.xlsx -------------------------------------------------------------------------------- /asm/enhancedplus/init.asm: -------------------------------------------------------------------------------- 1 | ; ----------------------------------------------------------------------------- 2 | ; MSX symbolic constants 3 | include "asm/symbols.asm" 4 | ; ----------------------------------------------------------------------------- 5 | 6 | ; ----------------------------------------------------------------------------- 7 | ; Sprite symbolic constants 8 | SPRITE_PATTERN: 9 | .SKULL4: equ $10 *4 10 | .SCORPION4: equ $28 *4 11 | .BAT4: equ $30 *4 12 | .SNAKE4: equ $38 *4 13 | 14 | SPRITE_COLOR: 15 | .SKULL: equ 15 16 | .SCORPION: equ 9 17 | .BAT: equ 5 18 | .SNAKE: equ 3 19 | ; ----------------------------------------------------------------------------- 20 | 21 | ; ----------------------------------------------------------------------------- 22 | ; Variables initialized once per game 23 | game.score_bcd: 24 | db $00, $00, $00 ; (6 digits) 25 | game.lives: 26 | db 5 27 | game.pyramid_count: 28 | db 0 29 | 30 | ; Enemies 31 | skull: 32 | db $00, $00 ; .spratr_y, .spratr_x 33 | db SPRITE_PATTERN.SKULL4 ; .spratr_pattern 34 | db SPRITE_COLOR.SKULL ; .spratr_color 35 | db 0 ; .direction 36 | db 0 ; .status 37 | db SPRITE_PATTERN.SKULL4 ; .base_pattern 38 | db 1 ; .sprite_plane ; ($03) 39 | scorpion1: 40 | db $00, $00, $00 ; .spratr_y 41 | db SPRITE_COLOR.SCORPION ; .spratr_color 42 | db $00 ; .direction 43 | db $00 ; .status 44 | db SPRITE_PATTERN.SCORPION4 ; .base_pattern ; ($12) 45 | db $02 ; .sprite_plane ; ($04) 46 | bat1: 47 | db $00, $00, $00 ; .spratr_y 48 | db SPRITE_COLOR.BAT ; .spratr_color 49 | db $00 ; .direction 50 | db $00 ; .status 51 | db SPRITE_PATTERN.BAT4 ; .base_pattern ; ($14) 52 | db $03 ; .sprite_plane ; ($05) 53 | snake1: 54 | db $00, $00, $00 ; .spratr_y 55 | db SPRITE_COLOR.SNAKE ; .spratr_color 56 | db $00 ; .direction 57 | db $00 ; .status 58 | db SPRITE_PATTERN.SNAKE4 ; .base_pattern ; ($16) 59 | db $04 ; .sprite_plane ; ($06) 60 | scorpion2: 61 | db $00, $00, $00 ; .spratr_y 62 | db SPRITE_COLOR.SCORPION ; .spratr_color 63 | db $00 ; .direction 64 | db $00 ; .status 65 | db SPRITE_PATTERN.SCORPION4 ; .base_pattern ; ($12) 66 | db $05 ; .sprite_plane ; ($07) 67 | bat2: 68 | db $00, $00, $00 ; .spratr_y 69 | db SPRITE_COLOR.BAT ; .spratr_color 70 | db $00 ; .direction 71 | db $00 ; .status 72 | db SPRITE_PATTERN.BAT4 ; .base_pattern ; ($14) 73 | db $06 ; .sprite_plane ; ($08) 74 | snake2: 75 | db $00, $00, $00 ; .spratr_y 76 | db SPRITE_COLOR.SNAKE ; .spratr_color 77 | db $00 ; .direction 78 | db $00 ; .status 79 | db SPRITE_PATTERN.SNAKE4 ; .base_pattern ; ($16) 80 | db $07 ; .sprite_plane ; ($09) 81 | ; ----------------------------------------------------------------------------- 82 | 83 | ; EOF 84 | -------------------------------------------------------------------------------- /asm/enhancedplus/init.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/init.bin -------------------------------------------------------------------------------- /asm/enhancedplus/init.bin.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/init.bin.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/mapper/LICENSE: -------------------------------------------------------------------------------- 1 | Pyramid Warp EX map editor © 2021 by Nenefranz is licensed under CC BY-NC-ND 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ 2 | -------------------------------------------------------------------------------- /asm/enhancedplus/mapper/pyramidwarpEXmapper.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/mapper/pyramidwarpEXmapper.exe -------------------------------------------------------------------------------- /asm/enhancedplus/mapper/rooms.asm: -------------------------------------------------------------------------------- 1 | ; ------------------------------ 2 | ; room 00 3 | ; walls ; XXXXXXXXXXXXX 4 | DB 01Dh, 000h ; X___XXX^X___X 5 | DB 040h, 040h ; X_X___N___X_X 6 | DB 05Fh, 040h ; X_X_XXXXX_X_X 7 | DB 000h, 000h ; X_____B_____X 8 | DB 06Eh, 0A0h ; X_XX_HHH_X_XX 9 | DB 020h, 0A0h ; X__X_____X_XX 10 | DB 08Eh, 000h ; XX___HHH____X 11 | DB 020h, 0C0h ; X__X__B__XX_X 12 | DB 06Eh, 0C0h ; X_XX_XXX_XXvX 13 | DB 040h, 060h ; X_X___B___XXX 14 | DB 01Fh, 000h ; X___XXXXX___X 15 | ; objects ; XXXXXXXXXXXXX 16 | DB 005h, 003h ; box1 17 | DB 005h, 007h ; box2 18 | DB 005h, 009h ; box3 19 | DB 005h, 001h ; nest 20 | DB 086h, 000h ; door (^) 21 | DB 00Ah, 008h ; door (v) 22 | ; ------------------------------ 23 | 24 | ; ------------------------------ 25 | ; room 01 26 | ; walls ; XXXXXXXXXXXXX 27 | DB 0EAh, 000h ; XXXX^X_X____X 28 | DB 088h, 0C0h ; XX___X___XX_X 29 | DB 0BAh, 0C0h ; XX_XXX_X_XX_X 30 | DB 002h, 000h ; XB_____X____X 31 | DB 0EEh, 0A0h ; XXXX_HHH_XBXX 32 | DB 000h, 000h ; XN__________X 33 | DB 0AEh, 0E0h ; XX_X_HHH_XXXX 34 | DB 008h, 000h ; X____X_____BX 35 | DB 06Bh, 0A0h ; X_XX_X_XXX_XX 36 | DB 062h, 020h ; X_XX___X___XX 37 | DB 00Ah, 0E0h ; X____XvX_XXXX 38 | ; objects ; XXXXXXXXXXXXX 39 | DB 000h, 003h ; box1 40 | DB 009h, 004h ; box2 41 | DB 00Ah, 007h ; box3 42 | DB 000h, 005h ; nest 43 | DB 083h, 000h ; door (^) 44 | DB 005h, 00Ah ; door (v) 45 | ; ------------------------------ 46 | 47 | ; ------------------------------ 48 | ; room 02 49 | ; walls ; XXXXXXXXXXXXX 50 | DB 000h, 040h ; X_____B___X_X 51 | DB 06Fh, 000h ; X_XX_XXXX___X 52 | DB 000h, 040h ; X_________X_X 53 | DB 07Ah, 080h ; X_XXXXvX_X__X 54 | DB 00Eh, 020h ; X____HHH___XX 55 | DB 0A0h, 080h ; XX_X_____X_BX 56 | DB 02Eh, 0A0h ; XN_X_HHH_X_XX 57 | DB 0A8h, 020h ; XX_X_X_____XX 58 | DB 003h, 080h ; X______XXX__X 59 | DB 076h, 0C0h ; X_XXX_XX^XX_X 60 | DB 000h, 000h ; X__B________X 61 | ; objects ; XXXXXXXXXXXXX 62 | DB 005h, 000h ; box1 63 | DB 00Ah, 005h ; box2 64 | DB 002h, 00Ah ; box3 65 | DB 000h, 006h ; nest 66 | DB 087h, 009h ; door (^) 67 | DB 005h, 003h ; door (v) 68 | ; ------------------------------ 69 | 70 | ; ------------------------------ 71 | ; room 03 72 | ; walls ; XXXXXXXXXXXXX 73 | DB 05Fh, 000h ; XBX_XXXXX_B_X 74 | DB 00Ah, 040h ; X____X^X__X_X 75 | DB 06Ah, 0C0h ; X_XX_X_X_XX_X 76 | DB 000h, 000h ; X___________X 77 | DB 05Eh, 0E0h ; X_X_XHHH_XXXX 78 | DB 000h, 000h ; X___________X 79 | DB 0BFh, 040h ; XX_XXHHHX_X_X 80 | DB 000h, 000h ; X___________X 81 | DB 06Ah, 0C0h ; X_XX_X_X_XX_X 82 | DB 02Ah, 000h ; X__X_XvX____X 83 | DB 08Eh, 0A0h ; XX_N_XXX_XBXX 84 | ; objects ; XXXXXXXXXXXXX 85 | DB 000h, 000h ; box1 86 | DB 009h, 000h ; box2 87 | DB 009h, 00Ah ; box3 88 | DB 002h, 00Ah ; nest 89 | DB 085h, 001h ; door (^) 90 | DB 005h, 009h ; door (v) 91 | ; ------------------------------ 92 | 93 | ; ------------------------------ 94 | ; room 04 95 | ; walls ; XXXXXXXXXXXXX 96 | DB 08Ah, 020h ; XX___X^X___XX 97 | DB 028h, 080h ; X__X_X___X__X 98 | DB 062h, 0C0h ; X_XX___X_XXBX 99 | DB 02Ah, 080h ; X__X_X_X_X__X 100 | DB 08Eh, 020h ; XX___HHH___XX 101 | DB 020h, 0E0h ; XN_X_____XXXX 102 | DB 08Eh, 020h ; XX___HHH___XX 103 | DB 02Ah, 080h ; X__X_X_X_X__X 104 | DB 062h, 0C0h ; XBXX___X_XXBX 105 | DB 028h, 080h ; X__X_X___X__X 106 | DB 08Ah, 020h ; XX___XvX___XX 107 | ; objects ; XXXXXXXXXXXXX 108 | DB 00Ah, 002h ; box1 109 | DB 000h, 008h ; box2 110 | DB 00Ah, 008h ; box3 111 | DB 000h, 005h ; nest 112 | DB 085h, 000h ; door (^) 113 | DB 005h, 00Ah ; door (v) 114 | ; ------------------------------ 115 | 116 | ; ------------------------------ 117 | ; room 05 118 | ; walls ; XXXXXXXXXXXXX 119 | DB 0AAh, 0A0h ; XX_X^X_XBX_XX 120 | DB 000h, 000h ; X___________X 121 | DB 0BBh, 0A0h ; XX_XXX_XXX_XX 122 | DB 000h, 000h ; XN__________X 123 | DB 0EEh, 0E0h ; XXXX_HHH_XXXX 124 | DB 000h, 000h ; X___________X 125 | DB 0EEh, 0E0h ; XXXX_HHH_XXXX 126 | DB 000h, 000h ; X__________BX 127 | DB 0BBh, 0A0h ; XX_XXX_XXX_XX 128 | DB 000h, 000h ; X___________X 129 | DB 0AAh, 0A0h ; XX_XBX_XvX_XX 130 | ; objects ; XXXXXXXXXXXXX 131 | DB 007h, 000h ; box1 132 | DB 00Ah, 007h ; box2 133 | DB 003h, 00Ah ; box3 134 | DB 000h, 003h ; nest 135 | DB 083h, 000h ; door (^) 136 | DB 007h, 00Ah ; door (v) 137 | ; ------------------------------ 138 | 139 | ; ------------------------------ 140 | ; room 06 141 | ; walls ; XXXXXXXXXXXXX 142 | DB 0AAh, 0A0h ; XX_X_X_XBX^XX 143 | DB 082h, 0A0h ; XX_____X_X_XX 144 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 145 | DB 028h, 000h ; XB_X_X______X 146 | DB 0AEh, 0A0h ; XX_X_HHH_X_XX 147 | DB 080h, 080h ; XX_______X_NX 148 | DB 0AEh, 0A0h ; XX_X_HHH_X_XX 149 | DB 022h, 020h ; X__X___X___XX 150 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 151 | DB 088h, 080h ; XX___X___X__X 152 | DB 0AAh, 0A0h ; XX_XvX_XBX_XX 153 | ; objects ; XXXXXXXXXXXXX 154 | DB 007h, 000h ; box1 155 | DB 000h, 003h ; box2 156 | DB 007h, 00Ah ; box3 157 | DB 00Ah, 005h ; nest 158 | DB 089h, 000h ; door (^) 159 | DB 003h, 00Ah ; door (v) 160 | ; ------------------------------ 161 | 162 | ; ------------------------------ 163 | ; room 07 164 | ; walls ; XXXXXXXXXXXXX 165 | DB 021h, 0A0h ; X_BX____XX^XX 166 | DB 06Ch, 000h ; X_XX_XX_____X 167 | DB 00Dh, 0A0h ; X____XX_XX_XX 168 | DB 061h, 0A0h ; X_XX____XX_XX 169 | DB 06Eh, 000h ; X_XX_HHH____X 170 | DB 000h, 0C0h ; X________XX_X 171 | DB 0BEh, 0C0h ; XX_XXHHH_XX_X 172 | DB 0B0h, 000h ; XX_XXN______X 173 | DB 003h, 060h ; X______XX_XXX 174 | DB 05Bh, 040h ; XBX_XX_XX_XBX 175 | DB 0D8h, 000h ; XXXvXX______X 176 | ; objects ; XXXXXXXXXXXXX 177 | DB 001h, 000h ; box1 178 | DB 000h, 009h ; box2 179 | DB 00Ah, 009h ; box3 180 | DB 004h, 007h ; nest 181 | DB 089h, 000h ; door (^) 182 | DB 002h, 00Ah ; door (v) 183 | ; ------------------------------ 184 | 185 | ; ------------------------------ 186 | ; room 08 187 | ; walls ; XXXXXXXXXXXXX 188 | DB 0BAh, 0A0h ; XX_XXX^XBX_XX 189 | DB 008h, 000h ; X____X______X 190 | DB 063h, 0C0h ; X_XX___XXXX_X 191 | DB 00Ah, 000h ; X_N__X_X____X 192 | DB 07Eh, 0A0h ; X_XXXHHH_X_XX 193 | DB 000h, 000h ; X___________X 194 | DB 0AEh, 0E0h ; XX_X_HHH_XXXX 195 | DB 0EAh, 000h ; XXXX_X_X___BX 196 | DB 08Ah, 0A0h ; XX___X_X_X_XX 197 | DB 020h, 080h ; X__X_____X__X 198 | DB 0AAh, 0A0h ; XXBX_XvX_X_XX 199 | ; objects ; XXXXXXXXXXXXX 200 | DB 007h, 000h ; box1 201 | DB 00Ah, 007h ; box2 202 | DB 001h, 00Ah ; box3 203 | DB 001h, 003h ; nest 204 | DB 085h, 000h ; door (^) 205 | DB 005h, 00Ah ; door (v) 206 | ; ------------------------------ 207 | 208 | ; ------------------------------ 209 | ; room 09 210 | ; walls ; XXXXXXXXXXXXX 211 | DB 050h, 000h ; X_XBX______BX 212 | DB 015h, 040h ; X___X_X_X_X_X 213 | DB 054h, 040h ; X_X_X_X___X_X 214 | DB 001h, 000h ; X_______X___X 215 | DB 07Fh, 0A0h ; X_XXXHHHXXNXX 216 | DB 040h, 000h ; XvX_________X 217 | DB 0EEh, 0E0h ; XXXX_HHH_XXXX 218 | DB 000h, 040h ; X_________X^X 219 | DB 0DBh, 040h ; XXX_XX_XX_X_X 220 | DB 008h, 040h ; XB___X____X_X 221 | DB 0A3h, 000h ; XX_X___XX___X 222 | ; objects ; XXXXXXXXXXXXX 223 | DB 002h, 000h ; box1 224 | DB 00Ah, 000h ; box2 225 | DB 000h, 009h ; box3 226 | DB 009h, 004h ; nest 227 | DB 08Ah, 007h ; door (^) 228 | DB 000h, 005h ; door (v) 229 | ; ------------------------------ 230 | 231 | ; ------------------------------ 232 | ; room 10 233 | ; walls ; XXXXXXXXXXXXX 234 | DB 010h, 020h ; X___X______XX 235 | DB 046h, 080h ; X_X___XX_XB_X 236 | DB 06Ah, 0C0h ; X_XX_X^X_XX_X 237 | DB 000h, 040h ; X_________X_X 238 | DB 0BFh, 000h ; XX_XXHHHX___X 239 | DB 0A0h, 0A0h ; XXBX_____XNXX 240 | DB 00Eh, 000h ; X____HHH____X 241 | DB 060h, 0A0h ; X_XX_____X_XX 242 | DB 04Ah, 080h ; X_X__XvX_X__X 243 | DB 02Eh, 0C0h ; X__X_XXX_XX_X 244 | DB 080h, 000h ; XX_______B__X 245 | ; objects ; XXXXXXXXXXXXX 246 | DB 009h, 001h ; box1 247 | DB 001h, 005h ; box2 248 | DB 008h, 00Ah ; box3 249 | DB 009h, 005h ; nest 250 | DB 085h, 002h ; door (^) 251 | DB 005h, 008h ; door (v) 252 | ; ------------------------------ 253 | 254 | ; ------------------------------ 255 | ; room 11 256 | ; walls ; XXXXXXXXXXXXX 257 | DB 02Ah, 080h ; X__X_XBX_X__X 258 | DB 060h, 0C0h ; X_XX_____XX_X 259 | DB 02Ah, 040h ; X__XBX_X_BX_X 260 | DB 0BBh, 0C0h ; XX_XXXvXXXX_X 261 | DB 01Fh, 000h ; X___XHHHX___X 262 | DB 040h, 040h ; X_X_______X_X 263 | DB 01Fh, 040h ; X___XHHHX_X_X 264 | DB 055h, 040h ; X_X_XNX^X_X_X 265 | DB 040h, 000h ; X_X_________X 266 | DB 05Dh, 040h ; X_X_XXX_X_X_X 267 | DB 000h, 000h ; X___________X 268 | ; objects ; XXXXXXXXXXXXX 269 | DB 005h, 000h ; box1 270 | DB 003h, 002h ; box2 271 | DB 008h, 002h ; box3 272 | DB 004h, 007h ; nest 273 | DB 086h, 007h ; door (^) 274 | DB 005h, 003h ; door (v) 275 | ; ------------------------------ 276 | 277 | ; ------------------------------ 278 | ; room 12 279 | ; walls ; XXXXXXXXXXXXX 280 | DB 060h, 0C0h ; XBXX_____XXBX 281 | DB 04Eh, 040h ; X_X__XXX__X_X 282 | DB 01Bh, 000h ; X___XX^XX___X 283 | DB 040h, 040h ; X_X_______X_X 284 | DB 06Eh, 0C0h ; X_XX_HHH_XX_X 285 | DB 000h, 000h ; X___________X 286 | DB 06Eh, 0C0h ; X_XX_HHH_XX_X 287 | DB 040h, 040h ; X_X_______X_X 288 | DB 01Bh, 000h ; X___XXNXX___X 289 | DB 04Eh, 040h ; X_X__XXX__X_X 290 | DB 060h, 0C0h ; XBXX_____XXvX 291 | ; objects ; XXXXXXXXXXXXX 292 | DB 000h, 000h ; box1 293 | DB 00Ah, 000h ; box2 294 | DB 000h, 00Ah ; box3 295 | DB 005h, 008h ; nest 296 | DB 085h, 002h ; door (^) 297 | DB 00Ah, 00Ah ; door (v) 298 | ; ------------------------------ 299 | 300 | ; ------------------------------ 301 | ; room 13 302 | ; walls ; XXXXXXXXXXXXX 303 | DB 003h, 040h ; X______XX_X^X 304 | DB 078h, 040h ; XvXXXX____X_X 305 | DB 0C2h, 0C0h ; XXX____X_XX_X 306 | DB 028h, 000h ; XN_X_X______X 307 | DB 0AEh, 0E0h ; XX_X_HHH_XXXX 308 | DB 000h, 000h ; X__________BX 309 | DB 0EEh, 0E0h ; XXXX_HHH_XXXX 310 | DB 044h, 000h ; XBX___X_____X 311 | DB 015h, 0A0h ; X___X_X_XX_XX 312 | DB 071h, 000h ; X_XXX___X___X 313 | DB 004h, 040h ; X_____X___XBX 314 | ; objects ; XXXXXXXXXXXXX 315 | DB 00Ah, 005h ; box1 316 | DB 000h, 007h ; box2 317 | DB 00Ah, 00Ah ; box3 318 | DB 000h, 003h ; nest 319 | DB 08Ah, 000h ; door (^) 320 | DB 000h, 001h ; door (v) 321 | ; ------------------------------ 322 | 323 | ; ------------------------------ 324 | ; room 14 325 | ; walls ; XXXXXXXXXXXXX 326 | DB 0BBh, 0E0h ; XXBXXX_XXXXXX 327 | DB 0A0h, 080h ; XX_X_____X__X 328 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 329 | DB 08Ah, 000h ; XX___XvX___BX 330 | DB 02Eh, 0A0h ; X__X_HHH_X_XX 331 | DB 040h, 080h ; X_XB_____X__X 332 | DB 02Eh, 0C0h ; X__X_HHH_XX_X 333 | DB 08Ah, 000h ; XX___X^X____X 334 | DB 0A0h, 0A0h ; XX_X_____X_XX 335 | DB 02Dh, 080h ; X__X_XX_XX__X 336 | DB 020h, 0A0h ; XN_X_____X_XX 337 | ; objects ; XXXXXXXXXXXXX 338 | DB 001h, 000h ; box1 339 | DB 00Ah, 003h ; box2 340 | DB 002h, 005h ; box3 341 | DB 000h, 00Ah ; nest 342 | DB 085h, 007h ; door (^) 343 | DB 005h, 003h ; door (v) 344 | ; ------------------------------ 345 | 346 | ; ------------------------------ 347 | ; room 15 348 | ; walls ; XXXXXXXXXXXXX 349 | DB 000h, 000h ; X___________X 350 | DB 000h, 000h ; X___________X 351 | DB 000h, 000h ; X___________X 352 | DB 000h, 000h ; X___________X 353 | DB 0FBh, 0E0h ; XXXXXX_XXXXXX 354 | DB 01Bh, 000h ; X___XX_XX___X 355 | DB 040h, 040h ; X_X_______X_X 356 | DB 075h, 0C0h ; X_XXX_X_XXX_X 357 | DB 000h, 000h ; X___________X 358 | DB 000h, 000h ; X___________X 359 | DB 000h, 000h ; X___________X 360 | ; objects ; XXXXXXXXXXXXX 361 | DB 00Fh, 00Fh ; box1 362 | DB 00Fh, 00Fh ; box2 363 | DB 00Fh, 00Fh ; box3 364 | DB 00Fh, 00Fh ; nest 365 | DB 08Fh, 00Fh ; door (^) 366 | DB 00Fh, 00Fh ; door (v) 367 | ; ------------------------------ 368 | 369 | -------------------------------------------------------------------------------- /asm/enhancedplus/mapper/rooms_original.asm: -------------------------------------------------------------------------------- 1 | ; ------------------------------ 2 | ; room 00 3 | ; walls ; XXXXXXXXXXXXX 4 | DB 051h, 040h ; XBX^X___X_X_X 5 | DB 004h, 000h ; X_____X_____X 6 | DB 0B5h, 0A0h ; XX_XX_X_XX_XX 7 | DB 080h, 000h ; XX__________X 8 | DB 02Eh, 0C0h ; X__X_HHH_XX_X 9 | DB 040h, 080h ; X_XB_____X__X 10 | DB 06Eh, 0A0h ; X_XX_HHH_X_XX 11 | DB 000h, 000h ; X__________BX 12 | DB 075h, 0A0h ; X_XXX_X_XX_XX 13 | DB 040h, 080h ; X_X______X__X 14 | DB 05Ah, 000h ; X_X_XXvX___NX 15 | ; objects ; XXXXXXXXXXXXX 16 | DB 000h, 000h ; box1 17 | DB 002h, 005h ; box2 18 | DB 00Ah, 007h ; box3 19 | DB 00Ah, 00Ah ; nest 20 | DB 082h, 000h ; door (^) 21 | DB 005h, 00Ah ; door (v) 22 | ; ------------------------------ 23 | 24 | ; ------------------------------ 25 | ; room 01 26 | ; walls ; XXXXXXXXXXXXX 27 | DB 02Ah, 0A0h ; XN_X_XBX_X^XX 28 | DB 008h, 000h ; X____X______X 29 | DB 0BAh, 0C0h ; XX_XXX_X_XX_X 30 | DB 000h, 080h ; X________X__X 31 | DB 0EEh, 0A0h ; XXXX_HHH_X_XX 32 | DB 080h, 000h ; XX__________X 33 | DB 0AEh, 0A0h ; XX_X_HHH_X_XX 34 | DB 008h, 000h ; XB___X_____BX 35 | DB 0ABh, 0A0h ; XX_X_X_XXX_XX 36 | DB 080h, 000h ; XX__________X 37 | DB 0AEh, 0A0h ; XXvX_XXX_X_XX 38 | ; objects ; XXXXXXXXXXXXX 39 | DB 005h, 000h ; box1 40 | DB 000h, 007h ; box2 41 | DB 00Ah, 007h ; box3 42 | DB 000h, 000h ; nest 43 | DB 089h, 000h ; door (^) 44 | DB 001h, 00Ah ; door (v) 45 | ; ------------------------------ 46 | 47 | ; ------------------------------ 48 | ; room 02 49 | ; walls ; XXXXXXXXXXXXX 50 | DB 0AAh, 0A0h ; XXBX_XBX^XBXX 51 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 52 | DB 000h, 000h ; X___________X 53 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 54 | DB 00Eh, 000h ; X____HHH_N__X 55 | DB 0A0h, 0A0h ; XX_X_____X_XX 56 | DB 00Eh, 000h ; X____HHH____X 57 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 58 | DB 080h, 020h ; XX_________XX 59 | DB 0EAh, 0E0h ; XXXX_X_X_XXXX 60 | DB 00Ah, 000h ; X____XvX____X 61 | ; objects ; XXXXXXXXXXXXX 62 | DB 001h, 000h ; box1 63 | DB 005h, 000h ; box2 64 | DB 009h, 000h ; box3 65 | DB 008h, 004h ; nest 66 | DB 087h, 000h ; door (^) 67 | DB 005h, 00Ah ; door (v) 68 | ; ------------------------------ 69 | 70 | ; ------------------------------ 71 | ; room 03 72 | ; walls ; XXXXXXXXXXXXX 73 | DB 06Ah, 0C0h ; X_XX_X^X_XX_X 74 | DB 000h, 000h ; X___________X 75 | DB 0BBh, 0A0h ; XXBXXX_XXXBXX 76 | DB 000h, 000h ; X___________X 77 | DB 06Eh, 0C0h ; X_XX_HHH_XX_X 78 | DB 000h, 000h ; X___________X 79 | DB 06Eh, 0C0h ; X_XX_HHH_XX_X 80 | DB 000h, 000h ; X___________X 81 | DB 03Bh, 0A0h ; XN_XXX_XXXBXX 82 | DB 000h, 000h ; X___________X 83 | DB 06Ah, 0C0h ; X_XX_XvX_XX_X 84 | ; objects ; XXXXXXXXXXXXX 85 | DB 001h, 002h ; box1 86 | DB 009h, 002h ; box2 87 | DB 009h, 008h ; box3 88 | DB 000h, 008h ; nest 89 | DB 085h, 000h ; door (^) 90 | DB 005h, 00Ah ; door (v) 91 | ; ------------------------------ 92 | 93 | ; ------------------------------ 94 | ; room 04 95 | ; walls ; XXXXXXXXXXXXX 96 | DB 08Bh, 040h ; XX___XBXX_X^X 97 | DB 028h, 000h ; XN_X_X______X 98 | DB 0A2h, 0C0h ; XX_X___X_XX_X 99 | DB 00Ah, 000h ; X____X_X____X 100 | DB 0DEh, 0C0h ; XXX_XHHH_XX_X 101 | DB 000h, 080h ; X________X__X 102 | DB 05Eh, 020h ; X_X_XHHH___XX 103 | DB 002h, 080h ; X______X_X__X 104 | DB 06Ah, 0C0h ; X_XX_X_XBXXBX 105 | DB 008h, 080h ; X____X___X__X 106 | DB 062h, 020h ; XvXX___X___XX 107 | ; objects ; XXXXXXXXXXXXX 108 | DB 005h, 000h ; box1 109 | DB 007h, 008h ; box2 110 | DB 00Ah, 008h ; box3 111 | DB 000h, 001h ; nest 112 | DB 08Ah, 000h ; door (^) 113 | DB 000h, 00Ah ; door (v) 114 | ; ------------------------------ 115 | 116 | ; ------------------------------ 117 | ; room 05 118 | ; walls ; XXXXXXXXXXXXX 119 | DB 005h, 000h ; XB____X^X___X 120 | DB 0DDh, 0C0h ; XXX_XXX_XXX_X 121 | DB 084h, 000h ; XX____X_____X 122 | DB 0B1h, 060h ; XX_XX___X_XXX 123 | DB 01Eh, 000h ; X___XHHH____X 124 | DB 040h, 0C0h ; X_X______XX_X 125 | DB 0AEh, 0C0h ; XXNX_HHH_XX_X 126 | DB 024h, 000h ; X__X__X_____X 127 | DB 0ADh, 060h ; XX_X_XX_X_XXX 128 | DB 004h, 000h ; X_____X_____X 129 | DB 0B1h, 040h ; XXBXX___XBXvX 130 | ; objects ; XXXXXXXXXXXXX 131 | DB 000h, 000h ; box1 132 | DB 001h, 00Ah ; box2 133 | DB 008h, 00Ah ; box3 134 | DB 001h, 006h ; nest 135 | DB 086h, 000h ; door (^) 136 | DB 00Ah, 00Ah ; door (v) 137 | ; ------------------------------ 138 | 139 | ; ------------------------------ 140 | ; room 06 141 | ; walls ; XXXXXXXXXXXXX 142 | DB 0AAh, 0A0h ; XX^X_X_X_X_XX 143 | DB 080h, 080h ; XX___B___X__X 144 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 145 | DB 022h, 020h ; X__X___X___XX 146 | DB 0AEh, 080h ; XX_X_HHH_X__X 147 | DB 080h, 040h ; XX_______NX_X 148 | DB 0AEh, 080h ; XX_X_HHH_X__X 149 | DB 022h, 020h ; X__X___X___XX 150 | DB 0EAh, 0A0h ; XXXX_X_XBX_XX 151 | DB 088h, 080h ; XX___X___X__X 152 | DB 02Ah, 0A0h ; XB_X_X_X_XvXX 153 | ; objects ; XXXXXXXXXXXXX 154 | DB 004h, 001h ; box1 155 | DB 007h, 008h ; box2 156 | DB 000h, 00Ah ; box3 157 | DB 008h, 005h ; nest 158 | DB 081h, 000h ; door (^) 159 | DB 009h, 00Ah ; door (v) 160 | ; ------------------------------ 161 | 162 | ; ------------------------------ 163 | ; room 07 164 | ; walls ; XXXXXXXXXXXXX 165 | DB 05Ah, 0C0h ; XBX_XXNX_XX^X 166 | DB 042h, 000h ; X_X____X____X 167 | DB 058h, 0A0h ; X_X_XX___X_XX 168 | DB 002h, 0A0h ; X______X_X_XX 169 | DB 05Eh, 000h ; X_X_XHHH____X 170 | DB 000h, 0C0h ; X________XX_X 171 | DB 05Fh, 0C0h ; X_X_XHHHXXX_X 172 | DB 000h, 000h ; X___________X 173 | DB 0ADh, 040h ; XX_X_XX_X_X_X 174 | DB 005h, 000h ; X_____X_X_B_X 175 | DB 054h, 060h ; XBX_XvX___XXX 176 | ; objects ; XXXXXXXXXXXXX 177 | DB 000h, 000h ; box1 178 | DB 009h, 009h ; box2 179 | DB 000h, 00Ah ; box3 180 | DB 005h, 000h ; nest 181 | DB 08Ah, 000h ; door (^) 182 | DB 004h, 00Ah ; door (v) 183 | ; ------------------------------ 184 | 185 | ; ------------------------------ 186 | ; room 08 187 | ; walls ; XXXXXXXXXXXXX 188 | DB 0BAh, 0A0h ; XX_XXX^XBX_XX 189 | DB 008h, 000h ; X____X______X 190 | DB 063h, 0C0h ; X_XX___XXXX_X 191 | DB 00Ah, 000h ; X_N__X_X____X 192 | DB 07Eh, 0A0h ; X_XXXHHH_X_XX 193 | DB 000h, 000h ; X___________X 194 | DB 0AEh, 0E0h ; XX_X_HHH_XXXX 195 | DB 0EAh, 000h ; XXXX_X_X___BX 196 | DB 08Ah, 0A0h ; XX___X_X_X_XX 197 | DB 020h, 080h ; X__X_____X__X 198 | DB 0AAh, 0A0h ; XXBX_XvX_X_XX 199 | ; objects ; XXXXXXXXXXXXX 200 | DB 007h, 000h ; box1 201 | DB 00Ah, 007h ; box2 202 | DB 001h, 00Ah ; box3 203 | DB 001h, 003h ; nest 204 | DB 085h, 000h ; door (^) 205 | DB 005h, 00Ah ; door (v) 206 | ; ------------------------------ 207 | 208 | ; ------------------------------ 209 | ; room 09 210 | ; walls ; XXXXXXXXXXXXX 211 | DB 054h, 040h ; X_XBX_X___XBX 212 | DB 015h, 000h ; X___X_X_X___X 213 | DB 0D5h, 0C0h ; XXX_X_X_XXXvX 214 | DB 004h, 020h ; X_____X____XX 215 | DB 07Fh, 060h ; X_XXXHHHX_XXX 216 | DB 000h, 000h ; X__________NX 217 | DB 0DFh, 060h ; XXX_XHHHX_XXX 218 | DB 010h, 040h ; X___X_____X^X 219 | DB 07Bh, 0C0h ; X_XXXX_XXXX_X 220 | DB 000h, 040h ; X___B_____X_X 221 | DB 0DFh, 000h ; XXX_XXXXX___X 222 | ; objects ; XXXXXXXXXXXXX 223 | DB 002h, 000h ; box1 224 | DB 00Ah, 000h ; box2 225 | DB 003h, 009h ; box3 226 | DB 00Ah, 005h ; nest 227 | DB 08Ah, 007h ; door (^) 228 | DB 00Ah, 002h ; door (v) 229 | ; ------------------------------ 230 | 231 | ; ------------------------------ 232 | ; room 10 233 | ; walls ; XXXXXXXXXXXXX 234 | DB 015h, 000h ; X___X^X_X___X 235 | DB 044h, 040h ; X_X___X___X_X 236 | DB 011h, 000h ; X_B_X___X_B_X 237 | DB 040h, 040h ; X_X___N___X_X 238 | DB 07Fh, 0C0h ; X_XXXHHHXXX_X 239 | DB 000h, 000h ; X___________X 240 | DB 07Fh, 0C0h ; X_XXXHHHXXX_X 241 | DB 051h, 0C0h ; X_X_X___XXX_X 242 | DB 044h, 040h ; X_X___X___X_X 243 | DB 011h, 040h ; X_B_X___X_X_X 244 | DB 054h, 000h ; X_X_XvX_____X 245 | ; objects ; XXXXXXXXXXXXX 246 | DB 001h, 002h ; box1 247 | DB 009h, 002h ; box2 248 | DB 001h, 009h ; box3 249 | DB 005h, 003h ; nest 250 | DB 084h, 000h ; door (^) 251 | DB 004h, 00Ah ; door (v) 252 | ; ------------------------------ 253 | 254 | ; ------------------------------ 255 | ; room 11 256 | ; walls ; XXXXXXXXXXXXX 257 | DB 02Ah, 080h ; X__X_X^X_X__X 258 | DB 0A0h, 0C0h ; XX_X_____XX_X 259 | DB 02Ah, 080h ; X__X_X_X_X__X 260 | DB 06Ah, 0A0h ; X_XXBXBXBX_XX 261 | DB 01Fh, 000h ; X___XHHHX___X 262 | DB 0C0h, 040h ; XXX_______X_X 263 | DB 01Fh, 000h ; X___XHHHX___X 264 | DB 044h, 040h ; X_X___X___X_X 265 | DB 06Bh, 000h ; X_XX_XNXX___X 266 | DB 041h, 040h ; X_X_____X_X_X 267 | DB 014h, 000h ; X___XvX_____X 268 | ; objects ; XXXXXXXXXXXXX 269 | DB 003h, 003h ; box1 270 | DB 005h, 003h ; box2 271 | DB 007h, 003h ; box3 272 | DB 005h, 008h ; nest 273 | DB 085h, 000h ; door (^) 274 | DB 004h, 00Ah ; door (v) 275 | ; ------------------------------ 276 | 277 | ; ------------------------------ 278 | ; room 12 279 | ; walls ; XXXXXXXXXXXXX 280 | DB 0A0h, 0E0h ; XXBX_____XXXX 281 | DB 08Ah, 020h ; XX___X_X___XX 282 | DB 02Ah, 080h ; X__X_XvX_X__X 283 | DB 064h, 0C0h ; X_XX__X__XX_X 284 | DB 00Eh, 000h ; X____HHH____X 285 | DB 0A0h, 0C0h ; XX_X_____XXBX 286 | DB 00Eh, 000h ; X____HHH____X 287 | DB 060h, 0C0h ; X_XX__N__XX_X 288 | DB 02Eh, 080h ; X__X_XXX_X__X 289 | DB 08Ah, 020h ; XX___X^X___XX 290 | DB 0A0h, 0E0h ; XXBX_____XXXX 291 | ; objects ; XXXXXXXXXXXXX 292 | DB 001h, 000h ; box1 293 | DB 00Ah, 005h ; box2 294 | DB 001h, 00Ah ; box3 295 | DB 005h, 007h ; nest 296 | DB 085h, 009h ; door (^) 297 | DB 005h, 002h ; door (v) 298 | ; ------------------------------ 299 | 300 | ; ------------------------------ 301 | ; room 13 302 | ; walls ; XXXXXXXXXXXXX 303 | DB 050h, 0C0h ; X^X_X____XXNX 304 | DB 056h, 0C0h ; X_X_X_XX_XX_X 305 | DB 006h, 000h ; X_____XX____X 306 | DB 050h, 0A0h ; X_X_X____X_XX 307 | DB 01Eh, 000h ; X___XHHH___BX 308 | DB 060h, 0A0h ; XBXX_____X_XX 309 | DB 08Eh, 000h ; XX___HHH____X 310 | DB 06Ch, 0C0h ; X_XX_XX__XX_X 311 | DB 00Ah, 000h ; X____X_X____X 312 | DB 060h, 0A0h ; X_XX_____X_XX 313 | DB 00Ah, 0A0h ; X____XBXvX_XX 314 | ; objects ; XXXXXXXXXXXXX 315 | DB 00Ah, 004h ; box1 316 | DB 000h, 005h ; box2 317 | DB 005h, 00Ah ; box3 318 | DB 00Ah, 000h ; nest 319 | DB 080h, 000h ; door (^) 320 | DB 007h, 00Ah ; door (v) 321 | ; ------------------------------ 322 | 323 | ; ------------------------------ 324 | ; room 14 325 | ; walls ; XXXXXXXXXXXXX 326 | DB 0BBh, 0E0h ; XXBXXX_XXXXXX 327 | DB 0A0h, 080h ; XX_X_____X__X 328 | DB 0AAh, 0A0h ; XX_X_X_X_X_XX 329 | DB 08Ah, 000h ; XX___XvX___BX 330 | DB 02Eh, 0A0h ; X__X_HHH_X_XX 331 | DB 040h, 080h ; X_XB_____X__X 332 | DB 02Eh, 0C0h ; X__X_HHH_XX_X 333 | DB 08Ah, 000h ; XX___X^X____X 334 | DB 0A0h, 0A0h ; XX_X_____X_XX 335 | DB 02Dh, 080h ; X__X_XX_XX__X 336 | DB 020h, 0A0h ; XN_X_____X_XX 337 | ; objects ; XXXXXXXXXXXXX 338 | DB 001h, 000h ; box1 339 | DB 00Ah, 003h ; box2 340 | DB 002h, 005h ; box3 341 | DB 000h, 00Ah ; nest 342 | DB 085h, 007h ; door (^) 343 | DB 005h, 003h ; door (v) 344 | ; ------------------------------ 345 | 346 | ; ------------------------------ 347 | ; room 15 348 | ; walls ; XXXXXXXXXXXXX 349 | DB 020h, 080h ; X__X_____X__X 350 | DB 020h, 080h ; X__X_____X__X 351 | DB 020h, 080h ; X__X_____X__X 352 | DB 020h, 080h ; X__X_____X__X 353 | DB 03Bh, 080h ; X__XXX_XXX__X 354 | DB 00Ah, 000h ; X____X_X____X 355 | DB 000h, 000h ; X___________X 356 | DB 055h, 040h ; X_X_X_X_X_X_X 357 | DB 000h, 000h ; X___________X 358 | DB 000h, 000h ; X___________X 359 | DB 000h, 000h ; X___________X 360 | ; objects ; XXXXXXXXXXXXX 361 | DB 00Fh, 00Fh ; box1 362 | DB 00Fh, 00Fh ; box2 363 | DB 00Fh, 00Fh ; box3 364 | DB 00Fh, 00Fh ; nest 365 | DB 08Fh, 00Fh ; door (^) 366 | DB 00Fh, 00Fh ; door (v) 367 | ; ------------------------------ 368 | 369 | -------------------------------------------------------------------------------- /asm/enhancedplus/mapper/tileset_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/mapper/tileset_map.png -------------------------------------------------------------------------------- /asm/enhancedplus/pyramids.asm: -------------------------------------------------------------------------------- 1 | 2 | ; ----------------------------------------------------------------------------- 3 | ; 1st floor variations 4 | DB $01, $05, $03, $02, $06, $04, $07 5 | DB $04, $05, $01, $07, $03, $06, $02 6 | DB $05, $02, $06, $04, $01, $07, $03 7 | DB $06, $01, $04, $05, $02, $03, $07 8 | 9 | ; 2nd floor variations 10 | DB $08, $0C, $0A, $09, $0B 11 | DB $0B, $08, $0A, $09, $0C 12 | DB $0C, $0A, $09, $0B, $08 13 | DB $0A, $09, $08, $0C, $0B 14 | 15 | ; 3rd floor variations 16 | DB $0D, $0E, $0F 17 | DB $0E, $0D, $0F 18 | DB $0F, $0E, $0D 19 | DB $0D, $0F, $0E 20 | ; ----------------------------------------------------------------------------- 21 | 22 | ; EOF 23 | -------------------------------------------------------------------------------- /asm/enhancedplus/screen_charset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/screen_charset.png -------------------------------------------------------------------------------- /asm/enhancedplus/screen_ingame.tmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,139,140,141,142,143,144,145,146,147, 9 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,148,166,167,168,169,170,171,172,156, 10 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,148,175,176,177,178,179,180,181,156, 11 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,148,150,149,173,174,169,168,166,156, 12 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,148,151,149,182,183,178,177,175,156, 13 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,157,158,159,160,161,162,163,164,165, 14 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,43,43,43,43,43,43, 15 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,18,19,17,18,43,43,43, 16 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,1,1,1,1,1,1, 17 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,43,43,43,43,43,43, 18 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,29,13,25,28,15,43,43, 19 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,1,1,1,1,1,1, 20 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,43,43,43,43,43,43, 21 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,11,19,28,43,43,43,43, 22 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,43,43,1,1,1,1, 23 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,43,43,43,43,43,43, 24 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,28,25,25,23,43,1,1, 25 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,139,140,141,142,188,144,145,189,190, 26 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,148,152,149,84,83,154,155,191,192, 27 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,148,153,84,84,84,84,154,149,156, 28 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,148,84,84,84,84,84,84,154,156, 29 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,187,84,84,84,84,84,84,84,156, 30 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,157,162,159,160,161,162,163,164,165, 31 | 95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,96,43,43,43,43,43,43,43,43 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /asm/enhancedplus/screen_ingame.tmx.bin.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/screen_ingame.tmx.bin.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/screen_title.tmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 9 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 10 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 11 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,23,29,34,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 12 | 43,43,43,43,43,43,43,43,184,140,141,142,143,144,145,146,140,141,142,143,144,143,145,147,43,43,43,43,43,43,43,43, 13 | 43,43,43,43,43,43,43,43,185,150,166,167,168,169,170,171,172,173,174,169,168,166,155,156,43,43,43,43,43,43,43,43, 14 | 43,43,43,43,43,43,43,43,185,151,175,176,177,178,179,180,181,182,183,178,177,175,149,156,43,43,43,43,43,43,43,43, 15 | 43,43,43,43,43,43,43,43,186,158,159,160,161,162,163,164,158,159,160,161,162,163,164,165,43,43,43,43,43,43,43,43, 16 | 43,43,43,43,43,43,41,13,42,43,2,10,9,4,43,12,35,43,30,37,15,43,29,25,16,30,43,43,43,43,43,43, 17 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 18 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 19 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 20 | 43,43,43,43,14,19,16,16,19,13,31,22,30,35,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 21 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 22 | 43,43,43,43,43,23,19,28,28,25,28,19,24,17,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 23 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 24 | 43,43,43,43,43,43,26,35,28,11,23,19,14,29,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 25 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 26 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 27 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 28 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 29 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 30 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43, 31 | 43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /asm/enhancedplus/screen_title.tmx.bin.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/screen_title.tmx.bin.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/LICENSE: -------------------------------------------------------------------------------- 1 | Pyramid Warp Enhanced+ music © 2021 by Bitcaffe is licensed under CC BY-NC-ND 4.0. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Dead2.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Dead2.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Dead2.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Dead2.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Dead2.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Dead2.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_LevelFinished.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_LevelFinished.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_LevelFinished.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_LevelFinished.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_LevelFinished.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_LevelFinished.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_NewGame.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_NewGame.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_NewGame.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_NewGame.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_NewGame.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_NewGame.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_IN.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_IN.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_IN.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_IN.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_IN.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_IN.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_A.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_A.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_A.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_A.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_A.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_A.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_B.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_B.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_B.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_B.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_B.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_B.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_C.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_C.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_C.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_C.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_C.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_C.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_A.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_A.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_A.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_A.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_A.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_A.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_B.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_B.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_B.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_B.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_B.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_B.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_C.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_C.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_C.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_C.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level2_C.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level2_C.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_A.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_A.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_A.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_A.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_A.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_A.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_B.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_B.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_B.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_B.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_B.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_B.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_C.pt3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_C.pt3 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_C.pt3.hl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_C.pt3.hl -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/PW_level3_C.pt3.hl.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sfx/PW_level3_C.pt3.hl.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/sfx/headerless.asm: -------------------------------------------------------------------------------- 1 | 2 | ; Removes the first 100 bytes from the PT3 files 3 | 4 | fname "asm/enhancedplus/sfx/PW_Dead2.pt3.hl" 5 | incbin "asm/enhancedplus/sfx/PW_Dead2.pt3", 100 6 | 7 | fname "asm/enhancedplus/sfx/PW_level1_A.pt3.hl" 8 | incbin "asm/enhancedplus/sfx/PW_level1_A.pt3", 100 9 | 10 | fname "asm/enhancedplus/sfx/PW_level1_B.pt3.hl" 11 | incbin "asm/enhancedplus/sfx/PW_level1_B.pt3", 100 12 | 13 | fname "asm/enhancedplus/sfx/PW_level1_C.pt3.hl" 14 | incbin "asm/enhancedplus/sfx/PW_level1_C.pt3", 100 15 | 16 | fname "asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3.hl" 17 | incbin "asm/enhancedplus/sfx/PW_level1_ONLY_FIRST_TIME.pt3", 100 18 | 19 | ; fname "asm/enhancedplus/sfx/PW_level2.pt3.hl" 20 | ; incbin "asm/enhancedplus/sfx/PW_level2.pt3", 100 21 | 22 | fname "asm/enhancedplus/sfx/PW_level2_A.pt3.hl" 23 | incbin "asm/enhancedplus/sfx/PW_level2_A.pt3", 100 24 | 25 | fname "asm/enhancedplus/sfx/PW_level2_B.pt3.hl" 26 | incbin "asm/enhancedplus/sfx/PW_level2_B.pt3", 100 27 | 28 | fname "asm/enhancedplus/sfx/PW_level2_C.pt3.hl" 29 | incbin "asm/enhancedplus/sfx/PW_level2_C.pt3", 100 30 | 31 | ; fname "asm/enhancedplus/sfx/PW_level3.pt3.hl" 32 | ; incbin "asm/enhancedplus/sfx/PW_level3.pt3", 100 33 | 34 | fname "asm/enhancedplus/sfx/PW_level3_A.pt3.hl" 35 | incbin "asm/enhancedplus/sfx/PW_level3_A.pt3", 100 36 | 37 | ; fname "asm/enhancedplus/sfx/PW_level3_all.pt3.hl" 38 | ; incbin "asm/enhancedplus/sfx/PW_level3_all.pt3", 100 39 | 40 | fname "asm/enhancedplus/sfx/PW_level3_B.pt3.hl" 41 | incbin "asm/enhancedplus/sfx/PW_level3_B.pt3", 100 42 | 43 | fname "asm/enhancedplus/sfx/PW_level3_C.pt3.hl" 44 | incbin "asm/enhancedplus/sfx/PW_level3_C.pt3", 100 45 | 46 | fname "asm/enhancedplus/sfx/PW_LevelFinished.pt3.hl" 47 | incbin "asm/enhancedplus/sfx/PW_LevelFinished.pt3", 100 48 | 49 | fname "asm/enhancedplus/sfx/PW_NewGame.pt3.hl" 50 | incbin "asm/enhancedplus/sfx/PW_NewGame.pt3", 100 51 | 52 | fname "asm/enhancedplus/sfx/PW_Sphinx_IN.pt3.hl" 53 | incbin "asm/enhancedplus/sfx/PW_Sphinx_IN.pt3", 100 54 | 55 | fname "asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3.hl" 56 | incbin "asm/enhancedplus/sfx/PW_Sphinx_IN2.pt3", 100 57 | 58 | fname "asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3.hl" 59 | incbin "asm/enhancedplus/sfx/PW_Sphinx_OUT.pt3", 100 60 | 61 | ; EOF 62 | -------------------------------------------------------------------------------- /asm/enhancedplus/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sprites.png -------------------------------------------------------------------------------- /asm/enhancedplus/sprites.png.spr.zx0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/sprites.png.spr.zx0 -------------------------------------------------------------------------------- /asm/enhancedplus/test.afb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/enhancedplus/test.afb -------------------------------------------------------------------------------- /asm/libext/PT3-RAM.tniasm.ASM: -------------------------------------------------------------------------------- 1 | ; --- THIS FILE MUST BE COMPILED IN RAM --- 2 | 3 | ; --- PT3 WORKAREA [self-modifying code patched] --- 4 | 5 | PT3_SETUP: rb 1 ;set bit0 to 1, if you want to play without looping 6 | ;bit7 is set each time, when loop point is passed 7 | PT3_MODADDR: rb 2 8 | PT3_CrPsPtr: rb 2 9 | PT3_SAMPTRS: rb 2 10 | PT3_OrnPtrs: rb 2 11 | PT3_PDSP: rb 2 12 | PT3_CSP: rb 2 13 | PT3_PSP: rb 2 14 | PT3_PrNote: rb 1 15 | PT3_PrSlide: rb 2 16 | PT3_AdInPtA: rb 2 17 | PT3_AdInPtB: rb 2 18 | PT3_AdInPtC: rb 2 19 | PT3_LPosPtr: rb 2 20 | PT3_PatsPtr: rb 2 21 | PT3_Delay: rb 1 22 | PT3_AddToEn: rb 1 23 | PT3_Env_Del: rb 1 24 | PT3_ESldAdd: rb 2 25 | 26 | VARS: 27 | 28 | ChanA: rb 29 ;CHNPRM_Size 29 | ChanB: rb 29 ;CHNPRM_Size 30 | ChanC: rb 29 ;CHNPRM_Size 31 | 32 | ;GlobalVars 33 | DelyCnt: rb 1 34 | CurESld: rb 2 35 | CurEDel: rb 1 36 | Ns_Base_AddToNs: 37 | Ns_Base: rb 1 38 | AddToNs: rb 1 39 | 40 | AYREGS: 41 | VT_: rb 14 42 | EnvBase: rb 2 43 | VAR0END: rb 240 44 | -------------------------------------------------------------------------------- /asm/libext/PT3-ROM.tniasm.ASM: -------------------------------------------------------------------------------- 1 | ; --- PT3 REPLAYER WORKING ON ROM --- 2 | ; --- Can be assembled with asMSX --- 3 | ; --- ROM version: MSX-KUN --- 4 | ; --- asMSX version: SapphiRe --- 5 | ; --- tniasm version: theNestruo --- 6 | 7 | ; Based on MSX version of PT3 by Dioniso 8 | ; 9 | ; This version of the replayer uses a fixed volume and note table, if you need a 10 | ; different note table you can copy it from TABLES.TXT file, distributed with the 11 | ; original PT3 distribution. This version also allows the use of PT3 commands. 12 | ; 13 | ; PLAY and PSG WRITE routines seperated to allow independent calls 14 | ; 15 | ; ROM LENGTH: 1528 bytes 16 | ; RAM LENGTH: 382 bytes 17 | 18 | ; --- CONSTANT VALUES DEFINITION --- 19 | 20 | ;ChannelsVars 21 | ;struc CHNPRM 22 | ;reset group 23 | CHNPRM_PsInOr: equ 0 ;RESB 1 24 | CHNPRM_PsInSm: equ 1 ;RESB 1 25 | CHNPRM_CrAmSl: equ 2 ;RESB 1 26 | CHNPRM_CrNsSl: equ 3 ;RESB 1 27 | CHNPRM_CrEnSl: equ 4 ;RESB 1 28 | CHNPRM_TSlCnt: equ 5 ;RESB 1 29 | CHNPRM_CrTnSl: equ 6 ;RESW 1 30 | CHNPRM_TnAcc: equ 8 ;RESW 1 31 | CHNPRM_COnOff: equ 10 ;RESB 1 32 | ;reset group 33 | 34 | CHNPRM_OnOffD: equ 11 ;RESB 1 35 | 36 | ;IX for PTDECOD here [+12] 37 | CHNPRM_OffOnD: equ 12 ;RESB 1 38 | CHNPRM_OrnPtr: equ 13 ;RESW 1 39 | CHNPRM_SamPtr: equ 15 ;RESW 1 40 | CHNPRM_NNtSkp: equ 17 ;RESB 1 41 | CHNPRM_Note: equ 18 ;RESB 1 42 | CHNPRM_SlToNt: equ 19 ;RESB 1 43 | CHNPRM_Env_En: equ 20 ;RESB 1 44 | CHNPRM_Flags: equ 21 ;RESB 1 45 | ;Enabled - 0,SimpleGliss - 2 46 | CHNPRM_TnSlDl: equ 22 ;RESB 1 47 | CHNPRM_TSlStp: equ 23 ;RESW 1 48 | CHNPRM_TnDelt: equ 25 ;RESW 1 49 | CHNPRM_NtSkCn: equ 27 ;RESB 1 50 | CHNPRM_Volume: equ 28 ;RESB 1 51 | CHNPRM_Size: equ 29 ;RESB 1 52 | ;endstruc 53 | 54 | ;struc AR 55 | AR_TonA: equ 0 ;RESW 1 56 | AR_TonB: equ 2 ;RESW 1 57 | AR_TonC: equ 4 ;RESW 1 58 | AR_Noise: equ 6 ;RESB 1 59 | AR_Mixer: equ 7 ;RESB 1 60 | AR_AmplA: equ 8 ;RESB 1 61 | AR_AmplB: equ 9 ;RESB 1 62 | AR_AmplC: equ 10 ;RESB 1 63 | AR_Env: equ 11 ;RESW 1 64 | AR_EnvTp: equ 13 ;RESB 1 65 | ;endstruc 66 | 67 | ; --- CODE STARTS HERE --- 68 | 69 | CHECKLP: LD HL,PT3_SETUP 70 | SET 7,[HL] 71 | BIT 0,[HL] 72 | RET Z 73 | POP HL 74 | LD HL,DelyCnt 75 | INC [HL] 76 | LD HL,ChanA+CHNPRM_NtSkCn 77 | INC [HL] 78 | PT3_MUTE: XOR A 79 | LD H,A 80 | LD L,A 81 | LD [AYREGS+AR_AmplA],A 82 | LD [AYREGS+AR_AmplB],HL 83 | JP ROUT_A0 84 | 85 | PT3_INIT: ;HL - AddressOfModule - 100 86 | LD [PT3_MODADDR],HL 87 | PUSH HL 88 | LD DE,100 89 | ADD HL,DE 90 | LD A,[HL] 91 | LD [PT3_Delay],A 92 | PUSH HL 93 | POP IX 94 | ADD HL,DE 95 | LD [PT3_CrPsPtr],HL 96 | LD E,[IX+102-100] 97 | ADD HL,DE 98 | INC HL 99 | LD [PT3_LPosPtr],HL 100 | POP DE 101 | LD L,[IX+103-100] 102 | LD H,[IX+104-100] 103 | ADD HL,DE 104 | LD [PT3_PatsPtr],HL 105 | LD HL,169 106 | ADD HL,DE 107 | LD [PT3_OrnPtrs],HL 108 | LD HL,105 109 | ADD HL,DE 110 | LD [PT3_SAMPTRS],HL 111 | LD HL,PT3_SETUP 112 | RES 7,[HL] 113 | 114 | ; --- CREATE PT3 VOLUME TABLE (c) Ivan Roshin, adapted by SapphiRe --- 115 | ld hl,$11 116 | ld d,h 117 | ld e,h 118 | ld IX,VT_+16 119 | ld b,15 120 | @@INITV1: push hl 121 | add hl,de 122 | ex de,hl 123 | sbc hl,hl 124 | ld c,b 125 | ld b,16 126 | @@INITV2: ld a,l 127 | rla 128 | ld a,h 129 | adc a,0 130 | ld [ix],a 131 | inc ix 132 | add hl,de 133 | djnz @@INITV2 134 | pop hl 135 | ld a,e 136 | cp $77 137 | jr nz,@@INITV3 138 | inc e 139 | @@INITV3: ld b,c 140 | djnz @@INITV1 141 | 142 | ; --- INITIALIZE PT3 VARIABLES --- 143 | XOR A 144 | LD HL,VARS 145 | LD [HL],A 146 | LD DE,VARS+1 147 | LD BC,VAR0END-VARS-1 148 | LDIR 149 | 150 | INC A 151 | LD [DelyCnt],A 152 | LD HL,$F001 ;H - CHNPRM_Volume, L - CHNPRM_NtSkCn 153 | LD [ChanA+CHNPRM_NtSkCn],HL 154 | LD [ChanB+CHNPRM_NtSkCn],HL 155 | LD [ChanC+CHNPRM_NtSkCn],HL 156 | 157 | LD HL,EMPTYSAMORN 158 | LD [PT3_AdInPtA],HL ;ptr to zero 159 | LD [ChanA+CHNPRM_OrnPtr],HL ;ornament 0 is "0,1,0" 160 | LD [ChanB+CHNPRM_OrnPtr],HL ;in all versions from 161 | LD [ChanC+CHNPRM_OrnPtr],HL ;3.xx to 3.6x and VTII 162 | 163 | LD [ChanA+CHNPRM_SamPtr],HL ;S1 There is no default 164 | LD [ChanB+CHNPRM_SamPtr],HL ;S2 sample in PT3, so, you 165 | LD [ChanC+CHNPRM_SamPtr],HL ;S3 can comment S1,2,3; see 166 | ;also EMPTYSAMORN comment 167 | RET 168 | 169 | ;pattern decoder 170 | PD_OrSm: LD [IX+(CHNPRM_Env_En-12)],0 171 | CALL SETORN 172 | LD A,[BC] 173 | INC BC 174 | RRCA 175 | 176 | PD_SAM: ADD A,A 177 | PD_SAM_: LD E,A 178 | LD D,0 179 | LD HL,[PT3_SAMPTRS] 180 | ADD HL,DE 181 | LD E,[HL] 182 | INC HL 183 | LD D,[HL] 184 | LD HL,[PT3_MODADDR] 185 | ADD HL,DE 186 | LD [IX+(CHNPRM_SamPtr-12)],L 187 | LD [IX+(CHNPRM_SamPtr+1-12)],H 188 | JR PD_LOOP 189 | 190 | PD_VOL: RLCA 191 | RLCA 192 | RLCA 193 | RLCA 194 | LD [IX+(CHNPRM_Volume-12)],A 195 | JR PD_LP2 196 | 197 | PD_EOff: LD [IX+(CHNPRM_Env_En-12)],A 198 | LD [IX+(CHNPRM_PsInOr-12)],A 199 | JR PD_LP2 200 | 201 | PD_SorE: DEC A 202 | JR NZ,PD_ENV 203 | LD A,[BC] 204 | INC BC 205 | LD [IX+(CHNPRM_NNtSkp-12)],A 206 | JR PD_LP2 207 | 208 | PD_ENV: CALL SETENV 209 | JR PD_LP2 210 | 211 | PD_ORN: CALL SETORN 212 | JR PD_LOOP 213 | 214 | PD_ESAM: LD [IX+(CHNPRM_Env_En-12)],A 215 | LD [IX+(CHNPRM_PsInOr-12)],A 216 | CALL NZ,SETENV 217 | LD A,[BC] 218 | INC BC 219 | JR PD_SAM_ 220 | 221 | PTDECOD: LD A,[IX+(CHNPRM_Note-12)] 222 | LD [PT3_PrNote],A 223 | LD L,[IX+(CHNPRM_CrTnSl-12)] 224 | LD H,[IX+(CHNPRM_CrTnSl+1-12)] 225 | LD [PT3_PrSlide],HL 226 | 227 | PD_LOOP: LD DE,$2010 228 | PD_LP2: LD A,[BC] 229 | INC BC 230 | ADD A,E 231 | JR C,PD_OrSm 232 | ADD A,D 233 | JR Z,PD_FIN 234 | JR C,PD_SAM 235 | ADD A,E 236 | JR Z,PD_REL 237 | JR C,PD_VOL 238 | ADD A,E 239 | JR Z,PD_EOff 240 | JR C,PD_SorE 241 | ADD A,96 242 | JR C,PD_NOTE 243 | ADD A,E 244 | JR C,PD_ORN 245 | ADD A,D 246 | JR C,PD_NOIS 247 | ADD A,E 248 | JR C,PD_ESAM 249 | ADD A,A 250 | LD E,A 251 | LD HL,SPCCOMS.HL_VALUE 252 | ADD HL,DE 253 | LD E,[HL] 254 | INC HL 255 | LD D,[HL] 256 | PUSH DE 257 | JR PD_LOOP 258 | 259 | PD_NOIS: LD [Ns_Base],A 260 | JR PD_LP2 261 | 262 | PD_REL: RES 0,[IX+(CHNPRM_Flags-12)] 263 | JR PD_RES 264 | 265 | PD_NOTE: LD [IX+(CHNPRM_Note-12)],A 266 | SET 0,[IX+(CHNPRM_Flags-12)] 267 | XOR A 268 | 269 | PD_RES: LD [PT3_PDSP],SP 270 | LD SP,IX 271 | LD H,A 272 | LD L,A 273 | PUSH HL 274 | PUSH HL 275 | PUSH HL 276 | PUSH HL 277 | PUSH HL 278 | PUSH HL 279 | LD SP,[PT3_PDSP] 280 | 281 | PD_FIN: LD A,[IX+(CHNPRM_NNtSkp-12)] 282 | LD [IX+(CHNPRM_NtSkCn-12)],A 283 | RET 284 | 285 | C_PORTM: RES 2,[IX+(CHNPRM_Flags-12)] 286 | LD A,[BC] 287 | INC BC 288 | ;SKIP PRECALCULATED TONE DELTA [BECAUSE 289 | ;CANNOT BE RIGHT AFTER PT3 COMPILATION] 290 | INC BC 291 | INC BC 292 | LD [IX+(CHNPRM_TnSlDl-12)],A 293 | LD [IX+(CHNPRM_TSlCnt-12)],A 294 | LD DE,NT_ 295 | LD A,[IX+(CHNPRM_Note-12)] 296 | LD [IX+(CHNPRM_SlToNt-12)],A 297 | ADD A,A 298 | LD L,A 299 | LD H,0 300 | ADD HL,DE 301 | LD A,[HL] 302 | INC HL 303 | LD H,[HL] 304 | LD L,A 305 | PUSH HL 306 | LD A,[PT3_PrNote] 307 | LD [IX+(CHNPRM_Note-12)],A 308 | ADD A,A 309 | LD L,A 310 | LD H,0 311 | ADD HL,DE 312 | LD E,[HL] 313 | INC HL 314 | LD D,[HL] 315 | POP HL 316 | SBC HL,DE 317 | LD [IX+(CHNPRM_TnDelt-12)],L 318 | LD [IX+(CHNPRM_TnDelt+1-12)],H 319 | LD DE,[PT3_PrSlide] 320 | LD [IX+(CHNPRM_CrTnSl-12)],E 321 | LD [IX+(CHNPRM_CrTnSl+1-12)],D 322 | LD A,[BC] ;SIGNED TONE STEP 323 | INC BC 324 | EX AF,AF' 325 | LD A,[BC] 326 | INC BC 327 | AND A 328 | JR Z,@@NOSIG 329 | EX DE,HL 330 | @@NOSIG: SBC HL,DE 331 | JP P,SET_STP 332 | CPL 333 | EX AF,AF' 334 | NEG 335 | EX AF,AF' 336 | SET_STP: LD [IX+(CHNPRM_TSlStp+1-12)],A 337 | EX AF,AF' 338 | LD [IX+(CHNPRM_TSlStp-12)],A 339 | LD [IX+(CHNPRM_COnOff-12)],0 340 | RET 341 | 342 | C_GLISS: SET 2,[IX+(CHNPRM_Flags-12)] 343 | LD A,[BC] 344 | INC BC 345 | LD [IX+(CHNPRM_TnSlDl-12)],A 346 | LD [IX+(CHNPRM_TSlCnt-12)],A 347 | LD A,[BC] 348 | INC BC 349 | EX AF,AF' 350 | LD A,[BC] 351 | INC BC 352 | JR SET_STP 353 | 354 | C_SMPOS: LD A,[BC] 355 | INC BC 356 | LD [IX+(CHNPRM_PsInSm-12)],A 357 | RET 358 | 359 | C_ORPOS: LD A,[BC] 360 | INC BC 361 | LD [IX+(CHNPRM_PsInOr-12)],A 362 | RET 363 | 364 | C_VIBRT: LD A,[BC] 365 | INC BC 366 | LD [IX+(CHNPRM_OnOffD-12)],A 367 | LD [IX+(CHNPRM_COnOff-12)],A 368 | LD A,[BC] 369 | INC BC 370 | LD [IX+(CHNPRM_OffOnD-12)],A 371 | XOR A 372 | LD [IX+(CHNPRM_TSlCnt-12)],A 373 | LD [IX+(CHNPRM_CrTnSl-12)],A 374 | LD [IX+(CHNPRM_CrTnSl+1-12)],A 375 | RET 376 | 377 | C_ENGLS: LD A,[BC] 378 | INC BC 379 | LD [PT3_Env_Del],A 380 | LD [CurEDel],A 381 | LD A,[BC] 382 | INC BC 383 | LD L,A 384 | LD A,[BC] 385 | INC BC 386 | LD H,A 387 | LD [PT3_ESldAdd],HL 388 | RET 389 | 390 | C_DELAY: LD A,[BC] 391 | INC BC 392 | LD [PT3_Delay],A 393 | RET 394 | 395 | SETENV: LD [IX+(CHNPRM_Env_En-12)],E 396 | LD [AYREGS+AR_EnvTp],A 397 | LD A,[BC] 398 | INC BC 399 | LD H,A 400 | LD A,[BC] 401 | INC BC 402 | LD L,A 403 | LD [EnvBase],HL 404 | XOR A 405 | LD [IX+(CHNPRM_PsInOr-12)],A 406 | LD [CurEDel],A 407 | LD H,A 408 | LD L,A 409 | LD [CurESld],HL 410 | C_NOP: RET 411 | 412 | SETORN: ADD A,A 413 | LD E,A 414 | LD D,0 415 | LD [IX+(CHNPRM_PsInOr-12)],D 416 | LD HL,[PT3_OrnPtrs] 417 | ADD HL,DE 418 | LD E,[HL] 419 | INC HL 420 | LD D,[HL] 421 | LD HL,[PT3_MODADDR] 422 | ADD HL,DE 423 | LD [IX+(CHNPRM_OrnPtr-12)],L 424 | LD [IX+(CHNPRM_OrnPtr+1-12)],H 425 | RET 426 | 427 | ;ALL 16 ADDRESSES TO PROTECT FROM BROKEN PT3 MODULES 428 | SPCCOMS: dw C_NOP 429 | dw C_GLISS 430 | dw C_PORTM 431 | dw C_SMPOS 432 | dw C_ORPOS 433 | dw C_VIBRT 434 | dw C_NOP 435 | dw C_NOP 436 | dw C_ENGLS 437 | dw C_DELAY 438 | dw C_NOP 439 | dw C_NOP 440 | dw C_NOP 441 | dw C_NOP 442 | dw C_NOP 443 | dw C_NOP 444 | .HL_VALUE: equ (SPCCOMS+$DF20) MOD 65536; Adapted from original Speccy version (saves 6 bytes) 445 | 446 | CHREGS: XOR A 447 | LD [AYREGS+AR_AmplC],A 448 | BIT 0,[IX+CHNPRM_Flags] 449 | PUSH HL 450 | JP Z,@@CH_EXIT 451 | LD [PT3_CSP],SP 452 | LD L,[IX+CHNPRM_OrnPtr] 453 | LD H,[IX+CHNPRM_OrnPtr+1] 454 | LD SP,HL 455 | POP DE 456 | LD H,A 457 | LD A,[IX+CHNPRM_PsInOr] 458 | LD L,A 459 | ADD HL,SP 460 | INC A 461 | CP D 462 | JR C,@@CH_ORPS 463 | LD A,E 464 | @@CH_ORPS: LD [IX+CHNPRM_PsInOr],A 465 | LD A,[IX+CHNPRM_Note] 466 | ADD A,[HL] 467 | JP P,@@CH_NTP 468 | XOR A 469 | @@CH_NTP: CP 96 470 | JR C,@@CH_NOK 471 | LD A,95 472 | @@CH_NOK: ADD A,A 473 | EX AF,AF' 474 | LD L,[IX+CHNPRM_SamPtr] 475 | LD H,[IX+CHNPRM_SamPtr+1] 476 | LD SP,HL 477 | POP DE 478 | LD H,0 479 | LD A,[IX+CHNPRM_PsInSm] 480 | LD B,A 481 | ADD A,A 482 | ADD A,A 483 | LD L,A 484 | ADD HL,SP 485 | LD SP,HL 486 | LD A,B 487 | INC A 488 | CP D 489 | JR C,@@CH_SMPS 490 | LD A,E 491 | @@CH_SMPS: LD [IX+CHNPRM_PsInSm],A 492 | POP BC 493 | POP HL 494 | LD E,[IX+CHNPRM_TnAcc] 495 | LD D,[IX+CHNPRM_TnAcc+1] 496 | ADD HL,DE 497 | BIT 6,B 498 | JR Z,@@CH_NOAC 499 | LD [IX+CHNPRM_TnAcc],L 500 | LD [IX+CHNPRM_TnAcc+1],H 501 | @@CH_NOAC: EX DE,HL 502 | EX AF,AF' 503 | LD L,A 504 | LD H,0 505 | LD SP,NT_ 506 | ADD HL,SP 507 | LD SP,HL 508 | POP HL 509 | ADD HL,DE 510 | LD E,[IX+CHNPRM_CrTnSl] 511 | LD D,[IX+CHNPRM_CrTnSl+1] 512 | ADD HL,DE 513 | LD SP,[PT3_CSP] 514 | EX [SP],HL 515 | XOR A 516 | OR [IX+CHNPRM_TSlCnt] 517 | JR Z,@@CH_AMP 518 | DEC [IX+CHNPRM_TSlCnt] 519 | JR NZ,@@CH_AMP 520 | LD A,[IX+CHNPRM_TnSlDl] 521 | LD [IX+CHNPRM_TSlCnt],A 522 | LD L,[IX+CHNPRM_TSlStp] 523 | LD H,[IX+CHNPRM_TSlStp+1] 524 | LD A,H 525 | ADD HL,DE 526 | LD [IX+CHNPRM_CrTnSl],L 527 | LD [IX+CHNPRM_CrTnSl+1],H 528 | BIT 2,[IX+CHNPRM_Flags] 529 | JR NZ,@@CH_AMP 530 | LD E,[IX+CHNPRM_TnDelt] 531 | LD D,[IX+CHNPRM_TnDelt+1] 532 | AND A 533 | JR Z,@@CH_STPP 534 | EX DE,HL 535 | @@CH_STPP: SBC HL,DE 536 | JP M,@@CH_AMP 537 | LD A,[IX+CHNPRM_SlToNt] 538 | LD [IX+CHNPRM_Note],A 539 | XOR A 540 | LD [IX+CHNPRM_TSlCnt],A 541 | LD [IX+CHNPRM_CrTnSl],A 542 | LD [IX+CHNPRM_CrTnSl+1],A 543 | @@CH_AMP: LD A,[IX+CHNPRM_CrAmSl] 544 | BIT 7,C 545 | JR Z,@@CH_NOAM 546 | BIT 6,C 547 | JR Z,@@CH_AMIN 548 | CP 15 549 | JR Z,@@CH_NOAM 550 | INC A 551 | JR @@CH_SVAM 552 | @@CH_AMIN: CP -15 553 | JR Z,@@CH_NOAM 554 | DEC A 555 | @@CH_SVAM: LD [IX+CHNPRM_CrAmSl],A 556 | @@CH_NOAM: LD L,A 557 | LD A,B 558 | AND 15 559 | ADD A,L 560 | JP P,@@CH_APOS 561 | XOR A 562 | @@CH_APOS: CP 16 563 | JR C,@@CH_VOL 564 | LD A,15 565 | @@CH_VOL: OR [IX+CHNPRM_Volume] 566 | LD L,A 567 | LD H,0 568 | LD DE,VT_ 569 | ADD HL,DE 570 | LD A,[HL] 571 | @@CH_ENV: BIT 0,C 572 | JR NZ,@@CH_NOEN 573 | OR [IX+CHNPRM_Env_En] 574 | @@CH_NOEN: LD [AYREGS+AR_AmplC],A 575 | BIT 7,B 576 | LD A,C 577 | JR Z,@@NO_ENSL 578 | RLA 579 | RLA 580 | SRA A 581 | SRA A 582 | SRA A 583 | ADD A,[IX+CHNPRM_CrEnSl] ;SEE COMMENT BELOW 584 | BIT 5,B 585 | JR Z,@@NO_ENAC 586 | LD [IX+CHNPRM_CrEnSl],A 587 | @@NO_ENAC: LD HL,PT3_AddToEn 588 | ADD A,[HL] ;BUG IN PT3 - NEED WORD HERE. 589 | ;FIX IT IN NEXT VERSION? 590 | LD [HL],A 591 | JR @@CH_MIX 592 | @@NO_ENSL: RRA 593 | ADD A,[IX+CHNPRM_CrNsSl] 594 | LD [AddToNs],A 595 | BIT 5,B 596 | JR Z,@@CH_MIX 597 | LD [IX+CHNPRM_CrNsSl],A 598 | @@CH_MIX: LD A,B 599 | RRA 600 | AND $48 601 | @@CH_EXIT: LD HL,AYREGS+AR_Mixer 602 | OR [HL] 603 | RRCA 604 | LD [HL],A 605 | POP HL 606 | XOR A 607 | OR [IX+CHNPRM_COnOff] 608 | RET Z 609 | DEC [IX+CHNPRM_COnOff] 610 | RET NZ 611 | XOR [IX+CHNPRM_Flags] 612 | LD [IX+CHNPRM_Flags],A 613 | RRA 614 | LD A,[IX+CHNPRM_OnOffD] 615 | JR C,@@CH_ONDL 616 | LD A,[IX+CHNPRM_OffOnD] 617 | @@CH_ONDL: LD [IX+CHNPRM_COnOff],A 618 | RET 619 | 620 | PT3_PLAY: XOR A 621 | LD [PT3_AddToEn],A 622 | LD [AYREGS+AR_Mixer],A 623 | DEC A 624 | LD [AYREGS+AR_EnvTp],A 625 | LD HL,DelyCnt 626 | DEC [HL] 627 | JP NZ,@@PL2 628 | LD HL,ChanA+CHNPRM_NtSkCn 629 | DEC [HL] 630 | JR NZ,@@PL1B 631 | LD BC,[PT3_AdInPtA] 632 | LD A,[BC] 633 | AND A 634 | JR NZ,@@PL1A 635 | LD D,A 636 | LD [Ns_Base],A 637 | LD HL,[PT3_CrPsPtr] 638 | INC HL 639 | LD A,[HL] 640 | INC A 641 | JR NZ,@@PLNLP 642 | CALL CHECKLP 643 | LD HL,[PT3_LPosPtr] 644 | LD A,[HL] 645 | INC A 646 | @@PLNLP: LD [PT3_CrPsPtr],HL 647 | DEC A 648 | ADD A,A 649 | LD E,A 650 | RL D 651 | LD HL,[PT3_PatsPtr] 652 | ADD HL,DE 653 | LD DE,[PT3_MODADDR] 654 | LD [PT3_PSP],SP 655 | LD SP,HL 656 | POP HL 657 | ADD HL,DE 658 | LD B,H 659 | LD C,L 660 | POP HL 661 | ADD HL,DE 662 | LD [PT3_AdInPtB],HL 663 | POP HL 664 | ADD HL,DE 665 | LD [PT3_AdInPtC],HL 666 | LD SP,[PT3_PSP] 667 | 668 | @@PL1A: LD IX,ChanA+12 669 | CALL PTDECOD 670 | LD [PT3_AdInPtA],BC 671 | 672 | @@PL1B: LD HL,ChanB+CHNPRM_NtSkCn 673 | DEC [HL] 674 | JR NZ,@@PL1C 675 | LD IX,ChanB+12 676 | LD BC,[PT3_AdInPtB] 677 | CALL PTDECOD 678 | LD [PT3_AdInPtB],BC 679 | 680 | @@PL1C: LD HL,ChanC+CHNPRM_NtSkCn 681 | DEC [HL] 682 | JR NZ,@@PL1D 683 | LD IX,ChanC+12 684 | LD BC,[PT3_AdInPtC] 685 | CALL PTDECOD 686 | LD [PT3_AdInPtC],BC 687 | 688 | @@PL1D: LD A,[PT3_Delay] 689 | LD [DelyCnt],A 690 | 691 | @@PL2: LD IX,ChanA 692 | LD HL,[AYREGS+AR_TonA] 693 | CALL CHREGS 694 | LD [AYREGS+AR_TonA],HL 695 | LD A,[AYREGS+AR_AmplC] 696 | LD [AYREGS+AR_AmplA],A 697 | LD IX,ChanB 698 | LD HL,[AYREGS+AR_TonB] 699 | CALL CHREGS 700 | LD [AYREGS+AR_TonB],HL 701 | LD A,[AYREGS+AR_AmplC] 702 | LD [AYREGS+AR_AmplB],A 703 | LD IX,ChanC 704 | LD HL,[AYREGS+AR_TonC] 705 | CALL CHREGS 706 | LD [AYREGS+AR_TonC],HL 707 | 708 | LD HL,[Ns_Base_AddToNs] 709 | LD A,H 710 | ADD A,L 711 | LD [AYREGS+AR_Noise],A 712 | 713 | LD A,[PT3_AddToEn] 714 | LD E,A 715 | ADD A,A 716 | SBC A,A 717 | LD D,A 718 | LD HL,[EnvBase] 719 | ADD HL,DE 720 | LD DE,[CurESld] 721 | ADD HL,DE 722 | LD [AYREGS+AR_Env],HL 723 | 724 | XOR A 725 | LD HL,CurEDel 726 | OR [HL] 727 | RET Z 728 | DEC [HL] 729 | RET NZ 730 | LD A,[PT3_Env_Del] 731 | LD [HL],A 732 | LD HL,[PT3_ESldAdd] 733 | ADD HL,DE 734 | LD [CurESld],HL 735 | RET 736 | 737 | PT3_ROUT: XOR A 738 | 739 | ROUT_A0: ; --- FIXES BITS 6 AND 7 OF MIXER --- 740 | LD HL,AYREGS+AR_Mixer 741 | set 7,[hl] 742 | res 6,[hl] 743 | 744 | LD C,$A0 745 | LD HL,AYREGS 746 | @@LOUT: OUT [C],A 747 | INC C 748 | OUTI 749 | DEC C 750 | INC A 751 | CP 13 752 | JR NZ,@@LOUT 753 | OUT [C],A 754 | LD A,[HL] 755 | AND A 756 | RET M 757 | INC C 758 | OUT [C],A 759 | RET 760 | 761 | EMPTYSAMORN: db 0,1,0,$90 ;delete $90 if you don't need default sample 762 | 763 | NT_: ;Note table 2 [if you use another in Vortex Tracker II copy it and paste 764 | ;it from TABLES.TXT] 765 | 766 | dw $0D10,$0C55,$0BA4,$0AFC,$0A5F,$09CA,$093D,$08B8,$083B,$07C5,$0755,$06EC 767 | dw $0688,$062A,$05D2,$057E,$052F,$04E5,$049E,$045C,$041D,$03E2,$03AB,$0376 768 | dw $0344,$0315,$02E9,$02BF,$0298,$0272,$024F,$022E,$020F,$01F1,$01D5,$01BB 769 | dw $01A2,$018B,$0174,$0160,$014C,$0139,$0128,$0117,$0107,$00F9,$00EB,$00DD 770 | dw $00D1,$00C5,$00BA,$00B0,$00A6,$009D,$0094,$008C,$0084,$007C,$0075,$006F 771 | dw $0069,$0063,$005D,$0058,$0053,$004E,$004A,$0046,$0042,$003E,$003B,$0037 772 | dw $0034,$0031,$002F,$002C,$0029,$0027,$0025,$0023,$0021,$001F,$001D,$001C 773 | dw $001A,$0019,$0017,$0016,$0015,$0014,$0012,$0011,$0010,$000F,$000E,$000D 774 | -------------------------------------------------------------------------------- /asm/libext/ayFX-RAM.tniasm.ASM: -------------------------------------------------------------------------------- 1 | ; --- ayFX REPLAYER v1.31 --- 2 | 3 | ; --- THIS FILE MUST BE COMPILED IN RAM --- 4 | 5 | ayFX_MODE: rb 1 ; ayFX mode 6 | ayFX_BANK: rw 1 ; Current ayFX Bank 7 | ayFX_PRIORITY: rb 1 ; Current ayFX stream priotity 8 | ayFX_POINTER: rw 1 ; Pointer to the current ayFX stream 9 | ayFX_TONE: rw 1 ; Current tone of the ayFX stream 10 | ayFX_NOISE: rb 1 ; Current noise of the ayFX stream 11 | ayFX_VOLUME: rb 1 ; Current volume of the ayFX stream 12 | ayFX_CHANNEL: rb 1 ; PSG channel to play the ayFX stream 13 | IFDEF CFG_AYFX_RELATIVE 14 | ayFX_VT: rw 1 ; ayFX relative volume table pointer 15 | ENDIF ; IFDEF CFG_AYFX_RELATIVE 16 | 17 | ; --- UNCOMMENT THIS IF YOU DON'T USE THIS REPLAYER WITH PT3 REPLAYER --- 18 | ;AYREGS: .ds 14 ; Ram copy of PSG registers 19 | ; --- UNCOMMENT THIS IF YOU DON'T USE THIS REPLAYER WITH PT3 REPLAYER --- 20 | -------------------------------------------------------------------------------- /asm/libext/ayFX-ROM.tniasm.ASM: -------------------------------------------------------------------------------- 1 | ; --- ayFX REPLAYER v1.31 --- 2 | 3 | CFG_REPLAYER_AYFX: equ 1 4 | 5 | ; --- v1.31 Fixed bug on previous version, only PSG channel C worked 6 | ; --- v1.3 Fixed volume and Relative volume versions on the same file, conditional compilation 7 | ; --- Support for dynamic or fixed channel allocation 8 | ; --- v1.2f/r ayFX bank support 9 | ; --- v1.11f/r If a frame volume is zero then no AYREGS update 10 | ; --- v1.1f/r Fixed volume for all ayFX streams 11 | ; --- v1.1 Explicit priority (as suggested by AR) 12 | ; --- v1.0f Bug fixed (error when using noise) 13 | ; --- v1.0 Initial release 14 | 15 | ayFX_SETUP: ; --- ayFX replayer setup --- 16 | ; --- INPUT: HL -> pointer to the ayFX bank --- 17 | ld [ayFX_BANK],hl ; Current ayFX bank 18 | xor a ; a:=0 19 | ld [ayFX_MODE],a ; Initial mode: fixed channel 20 | inc a ; Starting channel (=1) 21 | ld [ayFX_CHANNEL],a ; Updated 22 | ayFX_END: ; --- End of an ayFX stream --- 23 | ld a,255 ; Lowest ayFX priority 24 | ld [ayFX_PRIORITY],a ; Priority saved (not playing ayFX stream) 25 | ret ; Return 26 | 27 | ayFX_INIT: ; --- INIT A NEW ayFX STREAM --- 28 | ; --- INPUT: A -> sound to be played --- 29 | ; --- C -> sound priority --- 30 | push bc ; Store bc in stack 31 | push de ; Store de in stack 32 | push hl ; Store hl in stack 33 | ; --- Check if the index is in the bank --- 34 | ld b,a ; b:=a (new ayFX stream index) 35 | ld hl,[ayFX_BANK] ; Current ayFX BANK 36 | ld a,[hl] ; Number of samples in the bank 37 | or a ; If zero (means 256 samples)... 38 | jr z,@@CHECK_PRI ; ...goto @@CHECK_PRI 39 | ; The bank has less than 256 samples 40 | ld a,b ; a:=b (new ayFX stream index) 41 | cp [hl] ; If new index is not in the bank... 42 | ld a,2 ; a:=2 (error 2: Sample not in the bank) 43 | jr nc,@@INIT_END ; ...we can't init it 44 | @@CHECK_PRI: ; --- Check if the new priority is lower than the current one --- 45 | ; --- Remember: 0 = highest priority, 15 = lowest priority --- 46 | ; ld a,b ; a:=b (new ayFX stream index) ; (unnecessary? removed) 47 | ld a,[ayFX_PRIORITY] ; a:=Current ayFX stream priority 48 | cp c ; If new ayFX stream priority is lower than current one... 49 | ld a,1 ; a:=1 (error 1: A sample with higher priority is being played) 50 | jr c,@@INIT_END ; ...we don't start the new ayFX stream 51 | ; --- Set new priority --- 52 | ld a,c ; a:=New priority 53 | and $0F ; We mask the priority 54 | ld [ayFX_PRIORITY],a ; new ayFX stream priority saved in RAM 55 | 56 | IFDEF CFG_AYFX_RELATIVE 57 | ; --- Volume adjust using PT3 volume table --- 58 | ld c,a ; c:=New priority (fixed) 59 | ld a,15 ; a:=15 60 | sub c ; a:=15-New priority = relative volume 61 | jr z,@@INIT_NOSOUND ; If priority is 15 -> no sound output (volume is zero) 62 | add a,a ; a:=a*2 63 | add a,a ; a:=a*4 64 | add a,a ; a:=a*8 65 | add a,a ; a:=a*16 66 | ld e,a ; e:=a 67 | ld d,0 ; de:=a 68 | ld hl,VT_ ; hl:=PT3 volume table 69 | add hl,de ; hl is a pointer to the relative volume table 70 | ld [ayFX_VT],hl ; Save pointer 71 | ENDIF ; IFDEF CFG_AYFX_RELATIVE 72 | 73 | ; --- Calculate the pointer to the new ayFX stream --- 74 | ld de,[ayFX_BANK] ; de:=Current ayFX bank 75 | inc de ; de points to the increments table of the bank 76 | ld l,b ; l:=b (new ayFX stream index) 77 | ld h,0 ; hl:=b (new ayFX stream index) 78 | add hl,hl ; hl:=hl*2 79 | add hl,de ; hl:=hl+de (hl points to the correct increment) 80 | ld e,[hl] ; e:=lower byte of the increment 81 | inc hl ; hl points to the higher byte of the correct increment 82 | ld d,[hl] ; de:=increment 83 | add hl,de ; hl:=hl+de (hl points to the new ayFX stream) 84 | ld [ayFX_POINTER],hl ; Pointer saved in RAM 85 | xor a ; a:=0 (no errors) 86 | @@INIT_END: pop hl ; Retrieve hl from stack 87 | pop de ; Retrieve de from stack 88 | pop bc ; Retrieve bc from stack 89 | ret ; Return 90 | 91 | IFDEF CFG_AYFX_RELATIVE 92 | @@INIT_NOSOUND: ; --- Init a sample with relative volume zero -> no sound output --- 93 | ld a,255 ; Lowest ayFX priority 94 | ld [ayFX_PRIORITY],a ; Priority saved (not playing ayFX stream) 95 | jr @@INIT_END ; Jumps to @@INIT_END 96 | ENDIF ; IFDEF CFG_AYFX_RELATIVE 97 | 98 | ayFX_PLAY: ; --- PLAY A FRAME OF AN ayFX STREAM --- 99 | ld a,[ayFX_PRIORITY] ; a:=Current ayFX stream priority 100 | or a ; If priority has bit 7 on... 101 | ret m ; ...return 102 | ; --- Calculate next ayFX channel (if needed) --- 103 | ld a,[ayFX_MODE] ; ayFX mode 104 | and 1 ; If bit0=0 (fixed channel)... 105 | jr z,@@TAKECB ; ...skip channel changing 106 | ld hl,ayFX_CHANNEL ; Old ayFX playing channel 107 | dec [hl] ; New ayFX playing channel 108 | jr nz,@@TAKECB ; If not zero jump to @@TAKECB 109 | ld [hl],3 ; If zero -> set channel 3 110 | @@TAKECB: ; --- Extract control byte from stream --- 111 | ld hl,[ayFX_POINTER] ; Pointer to the current ayFX stream 112 | ld c,[hl] ; c:=Control byte 113 | inc hl ; Increment pointer 114 | ; --- Check if there's new tone on stream --- 115 | bit 5,c ; If bit 5 c is off... 116 | jr z,@@CHECK_NN ; ...jump to @@CHECK_NN (no new tone) 117 | ; --- Extract new tone from stream --- 118 | ld e,[hl] ; e:=lower byte of new tone 119 | inc hl ; Increment pointer 120 | ld d,[hl] ; d:=higher byte of new tone 121 | inc hl ; Increment pointer 122 | ld [ayFX_TONE],de ; ayFX tone updated 123 | @@CHECK_NN: ; --- Check if there's new noise on stream --- 124 | bit 6,c ; if bit 6 c is off... 125 | jr z,@@SETPOINTER ; ...jump to @@SETPOINTER (no new noise) 126 | ; --- Extract new noise from stream --- 127 | ld a,[hl] ; a:=New noise 128 | inc hl ; Increment pointer 129 | cp $20 ; If it's an illegal value of noise (used to mark end of stream)... 130 | jr z,ayFX_END ; ...jump to ayFX_END 131 | ld [ayFX_NOISE],a ; ayFX noise updated 132 | @@SETPOINTER: ; --- Update ayFX pointer --- 133 | ld [ayFX_POINTER],hl ; Update ayFX stream pointer 134 | ; --- Extract volume --- 135 | ld a,c ; a:=Control byte 136 | and $0F ; lower nibble 137 | 138 | IFDEF CFG_AYFX_RELATIVE 139 | ; --- Fix the volume using PT3 Volume Table --- 140 | ld hl,[ayFX_VT] ; hl:=Pointer to relative volume table 141 | ld e,a ; e:=a (ayFX volume) 142 | ld d,0 ; d:=0 143 | add hl,de ; hl:=hl+de (hl points to the relative volume of this frame 144 | ld a,[hl] ; a:=ayFX relative volume 145 | or a ; If relative volume is zero... 146 | ENDIF ; IFDEF CFG_AYFX_RELATIVE 147 | 148 | ld [ayFX_VOLUME],a ; ayFX volume updated 149 | ret z ; ...return (don't copy ayFX values in to AYREGS) 150 | ; ------------------------------------- 151 | ; --- COPY ayFX VALUES IN TO AYREGS --- 152 | ; ------------------------------------- 153 | ; --- Set noise channel --- 154 | bit 7,c ; If noise is off... 155 | jr nz,@@SETMASKS ; ...jump to @@SETMASKS 156 | ld a,[ayFX_NOISE] ; ayFX noise value 157 | ld [AYREGS+6],a ; copied in to AYREGS (noise channel) 158 | @@SETMASKS: ; --- Set mixer masks --- 159 | ld a,c ; a:=Control byte 160 | and $90 ; Only bits 7 and 4 (noise and tone mask for psg reg 7) 161 | cp $90 ; If no noise and no tone... 162 | ret z ; ...return (don't copy ayFX values in to AYREGS) 163 | ; --- Copy ayFX values in to ARYREGS --- 164 | rrca ; Rotate a to the right (1 TIME) 165 | rrca ; Rotate a to the right (2 TIMES) (OR mask) 166 | ld d,$DB ; d:=Mask for psg mixer (AND mask) 167 | ; --- Dump to correct channel --- 168 | ld hl,ayFX_CHANNEL ; Next ayFX playing channel 169 | ld b,[hl] ; Channel counter 170 | @@CHK1: ; --- Check if playing channel was 1 --- 171 | djnz @@CHK2 ; Decrement and jump if channel was not 1 172 | @@PLAY_C: ; --- Play ayFX stream on channel C --- 173 | call @@SETMIXER ; Set PSG mixer value (returning a=ayFX volume and hl=ayFX tone) 174 | ld [AYREGS+10],a ; Volume copied in to AYREGS (channel C volume) 175 | bit 2,c ; If tone is off... 176 | ret nz ; ...return 177 | ld [AYREGS+4],hl ; copied in to AYREGS (channel C tone) 178 | ret ; Return 179 | @@CHK2: ; --- Check if playing channel was 2 --- 180 | rrc d ; Rotate right AND mask 181 | rrca ; Rotate right OR mask 182 | djnz @@CHK3 ; Decrement and jump if channel was not 2 183 | @@PLAY_B: ; --- Play ayFX stream on channel B --- 184 | call @@SETMIXER ; Set PSG mixer value (returning a=ayFX volume and hl=ayFX tone) 185 | ld [AYREGS+9],a ; Volume copied in to AYREGS (channel B volume) 186 | bit 1,c ; If tone is off... 187 | ret nz ; ...return 188 | ld [AYREGS+2],hl ; copied in to AYREGS (channel B tone) 189 | ret ; Return 190 | @@CHK3: ; --- Check if playing channel was 3 --- 191 | rrc d ; Rotate right AND mask 192 | rrca ; Rotate right OR mask 193 | @@PLAY_A: ; --- Play ayFX stream on channel A --- 194 | call @@SETMIXER ; Set PSG mixer value (returning a=ayFX volume and hl=ayFX tone) 195 | ld [AYREGS+8],a ; Volume copied in to AYREGS (channel A volume) 196 | bit 0,c ; If tone is off... 197 | ret nz ; ...return 198 | ld [AYREGS+0],hl ; copied in to AYREGS (channel A tone) 199 | ret ; Return 200 | @@SETMIXER: ; --- Set PSG mixer value --- 201 | ld c,a ; c:=OR mask 202 | ld a,[AYREGS+7] ; a:=PSG mixer value 203 | and d ; AND mask 204 | or c ; OR mask 205 | ld [AYREGS+7],a ; PSG mixer value updated 206 | ld a,[ayFX_VOLUME] ; a:=ayFX volume value 207 | ld hl,[ayFX_TONE] ; ayFX tone value 208 | ret ; Return 209 | 210 | IFDEF CFG_AYFX_RELATIVE 211 | ; --- UNCOMMENT THIS IF YOU DON'T USE THIS REPLAYER WITH PT3 REPLAYER --- 212 | ;VT_: .INCBIN "VT.BIN" 213 | ; --- UNCOMMENT THIS IF YOU DON'T USE THIS REPLAYER WITH PT3 REPLAYER --- 214 | ENDIF ; IFDEF CFG_AYFX_RELATIVE 215 | -------------------------------------------------------------------------------- /asm/libext/dzx0_standard.asm: -------------------------------------------------------------------------------- 1 | ; ----------------------------------------------------------------------------- 2 | ; ZX0 decoder by Einar Saukas 3 | ; "Standard" version (69 bytes only) 4 | ; ----------------------------------------------------------------------------- 5 | ; Parameters: 6 | ; HL: source address (compressed data) 7 | ; DE: destination address (decompressing) 8 | ; ----------------------------------------------------------------------------- 9 | 10 | dzx0_standard: 11 | ld bc, $ffff ; preserve default offset 1 12 | push bc 13 | inc bc 14 | ld a, $80 15 | dzx0s_literals: 16 | call dzx0s_elias ; obtain length 17 | ldir ; copy literals 18 | add a, a ; copy from last offset or new offset? 19 | jr c, dzx0s_new_offset 20 | call dzx0s_elias ; obtain length 21 | dzx0s_copy: 22 | ex (sp), hl ; preserve source, restore offset 23 | push hl ; preserve offset 24 | add hl, de ; calculate destination - offset 25 | ldir ; copy from offset 26 | pop hl ; restore offset 27 | ex (sp), hl ; preserve offset, restore source 28 | add a, a ; copy from literals or new offset? 29 | jr nc, dzx0s_literals 30 | dzx0s_new_offset: 31 | call dzx0s_elias ; obtain offset MSB 32 | ex af, af' 33 | pop af ; discard last offset 34 | xor a ; adjust for negative offset 35 | sub c 36 | ret z ; check end marker 37 | ld b, a 38 | ex af, af' 39 | ld c, (hl) ; obtain offset LSB 40 | inc hl 41 | rr b ; last offset bit becomes first length bit 42 | rr c 43 | push bc ; preserve new offset 44 | ld bc, 1 ; obtain length 45 | call nc, dzx0s_elias_backtrack 46 | inc bc 47 | jr dzx0s_copy 48 | dzx0s_elias: 49 | inc c ; interlaced Elias gamma coding 50 | dzx0s_elias_loop: 51 | add a, a 52 | jr nz, dzx0s_elias_skip 53 | ld a, (hl) ; load another group of 8 bits 54 | inc hl 55 | rla 56 | dzx0s_elias_skip: 57 | ret c 58 | dzx0s_elias_backtrack: 59 | add a, a 60 | rl c 61 | rl b 62 | jr dzx0s_elias_loop 63 | ; ----------------------------------------------------------------------------- 64 | -------------------------------------------------------------------------------- /asm/libext/readme.txt: -------------------------------------------------------------------------------- 1 | ayFX replayer using asMSX syntax 2 | 3 | code: SapphiRe 4 | source: http://z80st.auic.es 5 | 6 | many thanks to AR for testing v1.0 and for suggestions about explicit priority 7 | and relative volume 8 | 9 | thanks to k0ga for their suggestions about using ayFX multisound banks 10 | instead of single ayFX samples 11 | 12 | thanks to Imanok for detecting bug on v1.3 13 | 14 | Version History 15 | --------------- 16 | 29-06-2013 v1.31 Fixed bug on previous version, only PSG channel C worked 17 | 22-03-2012 v1.3 Fixed volume and Relative volume versions on the same file, conditional compilation 18 | Support for dynamic or fixed channel allocation 19 | 12-02-2009 v1.2f/r The replayer uses ayFX multisound banks instead of ayFX samples. 20 | 22-01-2009 v1.11f/r Some routines relocated to compact the code. 21 | When ayFX volume is zero, ayFX values are not copied in to AYREGS. 22 | 19-01-2009 v1.1f All samples are played allways at maximum volume. 23 | v1.1r The priority controls also the relative volume of the sample. 24 | 17-01-2009 v1.1 Explicit priority (as suggested by AR). Internal release only. 25 | 15-01-2009 v1.0f Bugfix release (corrected a bug when using noise channel). 26 | 09-06-2008 v1.0 Initial release. 27 | 28 | 29 | What is it? 30 | ----------- 31 | This replayer allows to use ayFX samples on your MSX games. Also it interacts 32 | with your favourite music replayer (for instance PT3) and overwrites the PSG 33 | registers output generated by the music replayer, so you can write the correct 34 | values to PSG registers for music and FX at the same time. 35 | 36 | By default, the replayer plays all the frames of a sample on the same channel, 37 | but it also includes a switching channel routine that mixes the ayFX sample in 38 | a different PSG channel each frame. This way the music played is less affected 39 | by the FX samples. When the sample volume is zero no ayFX values are copied in 40 | to PSG registers. To activate the switching channel routine, the bit 0 of the 41 | ayFX_MODE variable must be 1. 42 | 43 | Also each sample can be played with a different priority (from 0 to 15). Higher 44 | values result in less priority. The playing of a sample can be interrupted if a 45 | new sample with higher priority is tried to be played. 46 | 47 | There are two different versions of the replayer: 48 | 49 | -Fixed volume version: all samples are played at their own volume (defined on 50 | the samples). To compile this version, define AYFXRELATIVE as 0. 51 | -Relative volume version: the priority also sets the relative volume of the 52 | sample. To compile this version, define AYFXRELATIVE as 1. 53 | 54 | 55 | How can I write ayFX samples? 56 | ----------------------------- 57 | You can use the ayFX editor made by shiru for Windows. Download it from: 58 | 59 | http://shiru.untergrund.net 60 | 61 | Since version 1.2, you must save the samples as a bank, using the "Save bank" 62 | or "Save bank w/o names" options to save a multisound bank. The only difference 63 | between these two options is that "Save bank" will also save the names of the 64 | samples. 65 | 66 | A bank can contain up to 256 ayFX samples. 67 | 68 | 69 | How to use (both fixed and relative volume versions) 70 | ---------------------------------------------------- 71 | 72 | There are three main routines on this player: setup a bank, init a sample and 73 | play a frame of a sample. 74 | 75 | -Bank setup: 76 | 77 | First of all, you need to call the ayFX_SETUP procedure to initialize the 78 | correct values of the replayer. When calling ayFX_SETUP you must set on hl the 79 | address of the sound bank you want to use. 80 | 81 | -Init a sample: 82 | 83 | When you want to play an ayFX sample, you need to put on register A (from 0 to 84 | 255) the index of the sample in the bank, and in register C the priority of the 85 | sample, and call to ayFX_INIT procedure. Legal sample priorities are from 0 86 | (highest priority) to 15 (lowest priority). Higher values may cause wrong 87 | results. 88 | 89 | The ayFX_INIT procedure returns a value on register A for debugging purposes: 90 | 91 | 0: no errors, the new sample has been correctly initialized 92 | 1: priority error, there's a sample with higher priority being played 93 | 2: index error, the current bank don't have a sample with such index 94 | 95 | -Play a frame of a sample: 96 | 97 | To play a frame of the stream, just call to ayFX_PLAY after a music replayer 98 | changed the ram copy of PSG registers (located under AYREGS label). If the ayFX 99 | frame produces no sound output, the aproppriate registers will remain unchanged. 100 | 101 | The suggested calling sequence is: 102 | 103 | HALT (vblank sinchronization) 104 | ... 105 | call PT3_ROUT (or a similar routine that copy AYREGS ram zone on PSG registers) 106 | ... 107 | call PT3_PLAY (or a similar routine that play a frame of the main music) 108 | ... 109 | call ayFX_PLAY 110 | ... 111 | 112 | 113 | Additional comments about relative volume version 114 | ------------------------------------------------- 115 | When using the relative volume version, the replayer uses priority as relative 116 | volume. So 0 (highest priority) results on relative volume 15 (highest volume) 117 | and 15 (lowest priority) results on relative volume 0 (silence). This comes from 118 | an idea of AR, which can be resumed in the following sentence: 119 | 120 | "Closer FX have to sound louder, 121 | and they must have a higher priority than far sounds" 122 | 123 | As the PSG volumes are not linear, the replayer uses the same volume table that 124 | PT3 replayer. So, if you use this ayFX replayer with the PT3 one, you don't need 125 | to explicitly put the table on your code, because the ayFX replayer looks for it 126 | on the same label (VT_) than PT3 replayer. 127 | 128 | If you're not using PT3 replayer, just uncomment the VT_ label at the end of the 129 | ayFX-ROM.asm file, and the volume table will be automatically loaded from vt.bin 130 | file. 131 | 132 | 133 | Contact 134 | ------- 135 | For any comments, bugs or suggestions, send an email to 136 | 137 | z80st.software@gmail.com 138 | -------------------------------------------------------------------------------- /asm/libext/vt.bin: -------------------------------------------------------------------------------- 1 |   2 |  3 | 4 |  5 | 6 |  7 | 8 |  9 |  10 |  -------------------------------------------------------------------------------- /asm/original/LICENSE: -------------------------------------------------------------------------------- 1 | Pyramid Warp (C) 1983 by T&E SOFT 2 | -------------------------------------------------------------------------------- /asm/original/charset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/original/charset.png -------------------------------------------------------------------------------- /asm/original/charset.png.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/original/charset.png.chr -------------------------------------------------------------------------------- /asm/original/charset.png.clr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/original/charset.png.clr -------------------------------------------------------------------------------- /asm/original/font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/asm/original/font.png -------------------------------------------------------------------------------- /asm/original/font.png.chr: -------------------------------------------------------------------------------- 1 | 8$B~BBB|""<""|"@@@"x$"""$x~@@x@@~~@@x@@@"@@N"BBB~BBBD8BDHpHDB@@@@@@~BfZZBBBBbRJFBBBBBBBB<BBB$$BBBZZfBBB$$BB"""~ @~0HH0JD:~  >@<|> 8) ; is 'b' 253 | 254 | 2.4 Expressions 255 | 256 | Expressions are evaluated in 32 bit signed integer arithmetic. An 257 | expression consists of one or more constants, combined with zero or 258 | more operators. Two special tokens can be used in expressions: '$' 259 | and '$$'. They are the assembly position (program counter) and file 260 | position respectively, at the beginning of the current instruction. 261 | 262 | One could code: 263 | 264 | nop 265 | nop 266 | jr $-2 ; jump to the first nop 267 | 268 | All supported operators are listed below, starting with the lowest 269 | precedence-level. Operators with equal precedence are evaluated 270 | from left to right. 271 | 272 | Ofcourse any precedence can be overridden with the parenthesis '(' 273 | and ')'. 274 | 275 | 2.4.1 Precedence Level 0 - Relational Operators 276 | 277 | The relational operators are: 278 | 279 | x = y equals 280 | x <> y not equals 281 | x >< y " " 282 | x != y " " 283 | x < y less than 284 | x > y more than 285 | x <= y less than or equals 286 | x =< y " " " " 287 | x >= y more than or equals 288 | x => y " " " " 289 | 290 | Unlike in the C-language, the relational operators use -1 for 'true' 291 | and 0 for 'false' (in stead of 1 and 0). This way there's no need 292 | for boolean versions of the AND, OR and XOR operators, since they 293 | work in exactly the same way as the bitwise ones. 294 | 295 | The relational operators allow for complex expressions such as: 296 | 297 | x*(1+2*(x<0)) 298 | 299 | which gives the absolute value of 'x'. 300 | 301 | 2.4.2 Precedence Level 1 - Additive and (X)OR Operators 302 | 303 | These should speak for themselves. tniASM chooses to use 'OR' and 304 | 'XOR' keywords (as in BASIC) in stead of '|' and '^' characters (as 305 | in C). 306 | 307 | x + y Addition 308 | x - y Subtraction 309 | 310 | x OR y Bitwise OR 311 | x XOR y Bitwise XOR 312 | 313 | 2.4.3 Precedence Level 2 - Multiplicative and AND Operators 314 | 315 | x ^ y Exponentiation 316 | x * y Multiplication 317 | x / y Division 318 | x MOD y Modulo 319 | 320 | x << y Shift Left 321 | x >> y Shift Right (unsigned) 322 | 323 | x AND y Bitwise AND 324 | 325 | 2.4.4 Precedence Level 3 - Unary Operators 326 | 327 | + x unary plus 328 | - x unary minus 329 | NOT x one's complement 330 | 331 | 2.5 Pseudo Instructions 332 | 333 | 2.5.1 DB/DW 334 | 335 | Define a (string of) byte(s)/word(s). 336 | 337 | DB 255 338 | DB "bla",13,10 339 | DW 'AB',4000h 340 | DW "string may be odd" ; odd strings are 0-padded 341 | 342 | 2.5.2 DC 343 | 344 | Defines a string terminated by bit 7 being set. 345 | 346 | DC "TOKEN" ; same as DB "TOKE","N" OR 128 347 | DC "LIST","STOP" ; defines 2 strings, both bit 7 terminated. 348 | 349 | 2.5.3 DS 350 | 351 | Define space (in bytes). 352 | 353 | DS 10 ; defines 10 bytes of 0 354 | DS 10,255 ; defines 10 bytes of 255 355 | DS 4000h-$ ; pad with 0 until address 4000h 356 | DS 0 ; doesn't do anything 357 | DS -1 ; the same goes for negative values 358 | 359 | 2.5.4 EQU 360 | 361 | Assign a value to a label. An EQU must follow a label on the same 362 | line. 363 | 364 | bankstart: EQU 4000h 365 | ORG bankstart ; same as org 4000h 366 | 367 | 2.5.5 FNAME 368 | 369 | Specify output file. Use FNAME to make tniASM output to a file 370 | other than 'tniasm.out'. You can use FNAME as much as you like 371 | throughout your source code in order to output different parts to 372 | different files. 373 | FNAME also sets FORG to 0. 374 | 375 | FNAME "output.bin" ; output file is now 'output.bin' 376 | {...} 377 | 378 | In stead of creating a new file, you can also instruct tniASM to 379 | output to an existing file by specifying a second parameter to 380 | FNAME. This second parameter is the file position where tniASM will 381 | output to, and FORG is automatically set with this value. 382 | 383 | FNAME "output.bin",1024 ; output starts at position 1024 in the 384 | ; existing file 'output.bin' 385 | FNAME "output.bin",0 ; output starts at position 0, like normal, 386 | ; but in an existing 'output.bin' 387 | 388 | 2.5.6 FORG 389 | 390 | Set output file position. You can use FORG to cause tniASM to 391 | output at a certain file position. If the position is larger than 392 | the file it will be padded with 0's. 393 | When no FORG is given, the starting file position will be 0. 394 | 395 | 2.5.7 INCBIN 396 | 397 | Include binary file. The INCBIN instruction includes a binary file 398 | in the current machine code output. It's particularly useful for 399 | embedding graphics or large tables that you wouldn't want to have 400 | in huge DB lists. 401 | 402 | music1: INCBIN "music1.bin" 403 | .end: 404 | 405 | INCBIN optionally takes 1 or 2 more parameters. The first is the 406 | offset in the file to be included. The second is the total length 407 | of data to be included. 408 | 409 | INCBIN "basic.bin",7 ; include from offset 7 410 | INCBIN "cutout.bin",1024,512 ; include 512 bytes from 411 | ; offset 1024 412 | 413 | 2.5.8 INCLUDE 414 | 415 | The INCLUDE instruction includes another file in the current source 416 | file, in nesting levels as deep as memory permits. 417 | 418 | {...} 419 | INCLUDE "incthis.asm" 420 | {...} 421 | 422 | 2.5.9 ORG 423 | 424 | ORG allows one or two arguments. The first sets the assembly 425 | position (program counter) to an address, while the second argument 426 | gives the maximum allowable address for this 'section'. If the 427 | address is exceeded, tniASM will issue a warning. This warning 428 | ignores any PHASE'ing. 429 | When no ORG is given, the starting assembly position will be 0. 430 | 431 | ORG 0c000h ; following code starts as if from 0c000h 432 | ORG 0c000h,0 ; same as above 433 | ORG 4000h,7FFFh ; start from 4000h, warn if exceeding 7FFFh 434 | 435 | 2.5.10 PHASE/DEPHASE 436 | 437 | PHASE 'phases' the assembly position to the address specified. This 438 | is particularly useful for code that gets relocated later. DEPHASE 439 | phases back to the normal assembly position. 440 | A new PHASE or ORG command DEPHASE's any previous PHASE'ing. 441 | 442 | ; this example relocates the routine SetS#0 from its current 443 | ; address to 0C000h. Because of the PHASE/DEPHASE its label 444 | ; 'SetS#0' already points to 0C000h. 445 | 446 | ORG 8000h 447 | 448 | ld hl,start 449 | ld de,SetS#0 450 | ld bc,SetS#0.end-SetS#0.start 451 | ldir 452 | 453 | {...} 454 | 455 | SetS#0.start: 456 | PHASE 0C000h 457 | SetS#0: xor a ; set V9938 S#0 458 | out [99h],a 459 | ld a,15+128 460 | out [99h],a 461 | ret 462 | DEPHASE 463 | .end: 464 | 465 | 2.5.11 RB/RW 466 | 467 | Reserve a (number of) byte(s)/word(s) as uninitialised data. This 468 | is basically the same as DS, but does not update the file position, 469 | neither does it output anything. It merely updates the assembly 470 | position. RB and RW are useful when declaring variables in RAM. 471 | 472 | ORG 0C000h 473 | Var1: RB 2 ; Var1 = 0C000h 474 | Var2: RW 1 ; Var2 = 0C002h 475 | Var3: RB 0 ; Var3 = 0C004h 476 | Var4: RW -1 ; Var4 = 0C004h because zero and 477 | ; negative values are ignored 478 | 479 | 2.6 Conditional Assembly 480 | 481 | Sometimes it's useful to have a certain piece of code assemble only 482 | when certain conditions are met. For instance when writing code for 483 | multiple platforms at the same time (Z80 and R800 for example), or 484 | for including/excluding debug code. 485 | 486 | tniASM provides this functionality through the IF-construct. Its 487 | basic form is: 488 | 489 | IF {operand} [{...}] [ELSE [{...}]] ENDIF 490 | 491 | Note that due to the multi-pass nature of tniASM, it's allowed to 492 | use forward references in IF-constructs. They may also be used 493 | accross source file boundaries. Ofcourse IF's can be nested with a 494 | practically infinite depth. 495 | 496 | 2.6.1 IF {expression} 497 | 498 | The expression is evaluated and is considered 'false' when zero, 499 | while any non-zero result is considered 'true'. 500 | 501 | loop: {...} 502 | 503 | IF $-loop < 128 504 | djnz loop 505 | ELSE 506 | dec b 507 | jp nz,loop 508 | ENDIF 509 | 510 | 2.6.2 IFDEF {label} 511 | 512 | Check if a label was previously declared this pass. 513 | 514 | R800: ; comment away for Z80 version 515 | 516 | IFDEF R800 mulub a,b ELSE call mulub_a_b ENDIF 517 | 518 | IFDEF R800 ELSE 519 | mulub_a_b: {...} 520 | ret 521 | ENDIF 522 | 523 | 2.6.3 IFEXIST {string} 524 | 525 | Check if a file exists. Look at the second example for a nice 526 | trick, which works with any IF-instruction. 527 | 528 | IFEXIST "test" {...} ENDIF ; do {...} if "test" exists 529 | IFEXIST "test" ELSE {...} ENDIF ; do {...} if "test" does not exist 530 | 531 | 2.6.4 IFEXIST {label} 532 | 533 | Similar to IFDEF, but checks if a label exists regardless of where 534 | or when it is declared. You can use this to check if a label is 535 | declared further on in the source code. 536 | 537 | 2.7 Multi CPU support 538 | 539 | tniASM can assembly code for several CPU's, namely Z80, R800 and 540 | the processor commonly known as GBZ80. By default, tniASM assumes 541 | it is working in R800/MSX mode. 542 | Using the "CPU" instruction, one can switch between the following 543 | modes. This can be done anywhere in your code and as often as you 544 | wish. 545 | 546 | The modes are called "Z80", "R800" (plus the alias "MSX") and 547 | "GBZ80". 548 | 549 | CPU Z80 ; switch to Z80 mode 550 | CPU R800 ; switch to R800 mode 551 | CPU MSX ; equivalent to R800 mode 552 | CPU GBZ80 ; switch to GBZ80 mode 553 | 554 | 2.7.1 Z80 mode 555 | 556 | This mode does not accept the R800 MULUB/MULUW opcodes, but 557 | otherwise is the same as R800/MSX mode. 558 | 559 | Differences with standard Z80 syntax rules are: 560 | 561 | - [ and ] is supported for indirection, in addition to ( and ). 562 | So if you want to read a word from memory address 4000h, you 563 | can code LD HL,[4000h] as equivalent of LD HL,(4000h). 564 | 565 | - For ADD, ADC, SUB, SBC, AND, XOR, OR and CP, the accumulator is 566 | optional. 567 | So CP A,B and CP B are equivalent. 568 | 569 | - IN [C] or IN F,[C] can be used. (Z80 undocumented) 570 | 571 | - IX and IY can be split up in IXH, IXL, IYH, IYL respectively. 572 | (Z80 undocumented) 573 | 574 | - SLL (including alias SLI) is supported. (Z80 undocumented) 575 | 576 | - PUSH and POP take a register list, evaluated from left to right. 577 | 578 | PUSH AF,BC,DE,HL ; pushes AF, BC, DE and HL in that order. 579 | POP HL,BC ; pops HL and then BC. 580 | 581 | 2.7.2 R800 or MSX mode 582 | 583 | All Z80 and R800 opcodes are accepted. 584 | 585 | Differences with standard R800 syntax rules are: 586 | 587 | - Z80 opcode and register names. 588 | 589 | - tniASM Z80 rules. (Chapter 2.7.1) 590 | 591 | - Note that SLL has a different (undocumented) function on R800. 592 | 593 | 2.7.3 GBZ80 594 | 595 | Only GBZ80 opcodes and extensions are accepted. 596 | 597 | Differences with standard GBZ80 syntax rules are: 598 | 599 | - LD A,(HLI) and LD A,(HLD) (and vice versa) are written LDI A,[HL] 600 | and LDD A,[HL]. 601 | 602 | - LD A,(n) and LD A,(C) (and vice versa) are written LDH A,[n] and 603 | LDH A,[C]. Furthermore they have aliases IN A,[x] and OUT [x],A. 604 | The LDH A,[n] and LDH [n],A can take values between 0-FF and 605 | FF00-FFFF hex. 606 | 607 | - ADD SP,d is written LD SP,SP+d. 608 | 609 | - LDHL SP,d is written LD HL,SP+d. 610 | 611 | - tniASM Z80 rules. (Chapter 2.7.1) 612 | 613 | Chapter 3: Other Stuff 614 | ---------------------- 615 | 616 | 3.1 Tips and Tricks 617 | 618 | The best tip I can give you when working with tniASM is to keep one 619 | file in which you include every other file. Sort of like a makefile 620 | without dependencies and object stuff. 621 | 622 | ; "example.asm" 623 | ; this is an example 'makefile' 624 | 625 | fname "example.com" 626 | org 100h 627 | include "frontend.asm" 628 | include "main.asm" 629 | include "backend.asm" 630 | 631 | fname "example.dat" 632 | org 0 633 | incbin "stuff.dat" 634 | include "somesubs.asm" 635 | 636 | 3.2 History 637 | 638 | 2 November 2011, v0.45 Magnum mercy shot 639 | - Fixed: Generate error for LD L,IXL (or similar) instead of simply 640 | outputting LD IXL,IXL. 641 | - Now supports using expressions for the fixed numeric operands in 642 | IM, RST, BIT, RES and SET instructions. Previously generated an 643 | error or wrong result! 644 | - Officially the last version of the v0.x series. See Chapter 3.3 645 | for information about tniASM v1.0. 646 | 647 | 2 March 2005, v0.44 648 | - Fixed: $ during PHASE 649 | 650 | 22 January 2005, v0.43 651 | - The operator != is now supported as an alias for <>. 652 | - Fixed: A bug concerning IF-ELSE sometimes caused errors. 653 | - Updates in the manual (Chapter 2.7.2, 3.3) 654 | 655 | 14 November 2004, v0.42 656 | - Fixed: A nested IF in an IF block that resolved as false caused 657 | an infinite loop. 658 | - Fixed: Defining a local label without a parent label now returns 659 | an error message. 660 | 661 | 17 September 2004, v0.41 662 | - tniASM now handles source files using extended ASCII characters. 663 | 664 | 4 October 2003, v0.4 Special #msxdev Edition 665 | - Second command parameter now specifies initial output filename. 666 | (Same as using fname directive.) 667 | - Now allows spaces surrounding registers in indirect accesses. 668 | - PUSH and POP allow a list of registers, evaluated from left to 669 | right. 670 | - DC pseudo instruction added, see Chapter 2.5.2 671 | - Updated the manual to reflect the changes in v0.35 and v0.4. 672 | 673 | 2 October 2003, v0.35 674 | - Due to popular demand, hacked up a version that allows () for 675 | indirection, [] and () are now identical. 676 | 677 | 24 December 2002, v0.3 678 | - About 2.5 times faster assembly. 679 | - Fixed things: 680 | * File error on INCBIN displayed wrong filename. 681 | * GBZ80 'LDI/LDD A,[HL]' caused an error. 682 | * ORG without warning argument didn't reset warning. 683 | * Local labels could change scope between passes. 684 | * 'INCLUDE' and 'CPU' parsing is more robust. 685 | * Minor manual corrections. 686 | 687 | 16 September 2000, v0.2 MSX Fair Bussum Edition 688 | - Conditional assembly, see chapter 2.6 689 | - Practically unlimited label length, see chapter 2.2.1 690 | - Octal numeric constants, see chapter 2.3.1 691 | - Multi CPU support (added GBZ80), see chapter 2.7 692 | - Uninitialised data declarations, see chapter 2.5.11 693 | 694 | 14 August 2000, v0.1 Initial Release 695 | 696 | 3.3 tniASM v1.0 697 | 698 | tniASM v1.0 is a completely rewritten version of tniASM. It is 699 | really a whole different program. Completely processor-agnostic, 700 | even assembly-agnostic, it is ideal for custom processors and even 701 | non-assembly work like file manipulation. Continuing tniASM 702 | tradition, great care has been taken in remaining very easy to use 703 | while providing powerful features. 704 | 705 | The most important feature, the base of everything, is the powerful 706 | macro processor. It provides: 707 | - multiple CPU support, even within the same source file 708 | - customized assembly, use the (pseudo-)instructions YOU like 709 | - ability to be compatible with other assemblers 710 | 711 | tniASM v1.0 comes in versions for 32-bit Windows and 64-bit Linux, 712 | and macro definitions for: 713 | - Z80, R800, GBZ80 and Z380 processors 714 | - code, data and reserved data sections 715 | - tniASM v0.45 compatibility 716 | 717 | tniASM v1.0 is in production use for all projects by, among others, 718 | The New Image and Infinite. You too can participate in the private 719 | beta test by making a donation of at least 15 Euro to bank account 720 | BIC:INGBNL2A, IBAN:NL42INGB0006268083, of Patriek Lesparre in 721 | Almere, The Netherlands. Don't forget to indicate your e-mail 722 | address! If you prefer to use Paypal, donate to paypal@tni.nl. 723 | 724 | Beta testers will receive the latest development versions and can 725 | give their input on the development of the program. Once considered 726 | fit for the public, tniASM v1.0 is expected to be sold for 25 Euro, 727 | but beta testers will receive it for free. 728 | 729 | 3.4 Disclaimer 730 | 731 | - All trademarks are property of their respective owners. 732 | - tniASM v0.45 is freeware and can be distributed freely as long as 733 | it is not modified, this file is included in the archive, and it 734 | is not part of a commercial product. 735 | - Use it at your own risk. The author is not responsible for any 736 | loss or damage resulting from the use or misuse of this software. 737 | 738 | --------------------------------------------------------------------------- 739 | -------------------------------------------------------------------------------- /bin/yazd.md: -------------------------------------------------------------------------------- 1 | # YAZD - Yet Another Z80 Disassembler 2 | 3 | YAZD is a simple command line disassembler for Z80 binary code files. It's based on the disassembler in [z80ex](http://z80ex.sourceforge.net/), ported to C#. 4 | 5 | YAZD supports the following: 6 | 7 | * Disassembly of all Z80 instructions, as supported by z80ex. 8 | * Code path analysis can usually tell the difference between code and data. 9 | * Generates labelled assembly language listings. 10 | * Can also generate more detailed listing files with byte code and assembly source. 11 | * Can detect procedure boundaries and generate call graphs 12 | * Can generate reference listings to all external addresses and I/O ports. 13 | * Can highlight all word literals (use to help find other memory address references). 14 | * Can generate plain text, or hyperlinked HTML output files. 15 | * Handles references to addresses not aligned with instruction (eg: self modifying code) 16 | * Data segments are listed 1 DB byte per line with ASCII character in comments. 17 | 18 | 19 | ## Download 20 | 21 | Download here: 22 | 23 | * 24 | 25 | Requires: 26 | 27 | * Windows and .NET 4.0 or later 28 | * Linux/OSX with Mono 2.8 or later (not tested, should work) 29 | 30 | ## Usage 31 | 32 | yazd source.bin [destination.asm] [options] [@responsefile] 33 | 34 | Options: 35 | 36 | --addr:N Z-80 base address of first byte after header, default=0x0000 37 | --start:N Z-80 address to disassemble from, default=addr 38 | --end:N Z-80 address to stop at, default=eof 39 | --len:N Number of bytes to disassemble (instead of --end) 40 | --entry:N Specifies an entry point (see below) 41 | --xref Include referenced locations of labels 42 | --lst Generate a listing file (more detail, can't be assembled) 43 | --html Generates a HTML file, with hyperlinked references 44 | --open Automatically opens the generated file with default associated app 45 | --lowercase|lc Render in lowercase 46 | --markwordrefs|mwr Highlight with a comment literal word values (as they may be addresses) 47 | --reloffs Show the offset of relative address mode instructions 48 | --header:N Skip N header bytes at start of file 49 | --help Show these help instruction 50 | --v Show version information 51 | 52 | Numeric arguments can be in decimal (no prefix) or hex if prefixed with '0x'. 53 | 54 | If one or more `--entry` arguments are specified (recommended), the file is disassembled by 55 | following the code paths from those entry points. All unvisited regions will be rendered 56 | as 'DB' directives. 57 | 58 | If the `--entry` argument is not specified, the file is disassembled from top to bottom. 59 | 60 | Output is sent to stdout if no destination file specified. 61 | 62 | Response file containing arguments can be specified using the @ prefix 63 | 64 | Example: 65 | 66 | yazd --addr:0x0400 --entry:0x1983 -lst robotf.bin robotf.lst 67 | 68 | ## Example Output 69 | 70 | Typical source mode output. Note that YAZD is normally smart enough to tell the 71 | difference between local labels and procedure boundaries. This helps divide up 72 | the listing making it easier to understand. 73 | 74 | ORG 0900h 75 | 76 | ; Entry Point 77 | ; --- START PROC L0900 --- 78 | L0900: LD A,0Ah 79 | OUT (0Ch),A 80 | LD A,2Fh ; '/' 81 | OUT (0Dh),A 82 | LD HL,0F800h 83 | LD C,80h 84 | L090D: LD E,C 85 | LD D,03h 86 | L0910: XOR A 87 | BIT 0,E 88 | JR Z,L0917 89 | OR 0F0h 90 | L0917: BIT 1,E 91 | JR Z,L091D 92 | OR 0Fh 93 | L091D: LD B,05h 94 | LD (HL),A 95 | INC HL 96 | DJNZ L091F 97 | RRC E 98 | RRC E 99 | DEC D 100 | JR NZ,L0910 101 | LD (HL),A 102 | INC HL 103 | INC C 104 | JR NZ,L090D 105 | JP L1042 106 | 107 | ; --- START PROC L0932 --- 108 | L0932: PUSH BC 109 | LD C,A 110 | LD B,A 111 | LD A,12h 112 | OUT (0Ch),A 113 | LD A,B 114 | RRCA 115 | RRCA 116 | RRCA 117 | RRCA 118 | 119 | Unreachable addresses are automatically detected and rendered as DB directives when the `--entry` argument 120 | is used. If something is incorrectly detected as data instead of code, just add an extra `--entry` parameter; 121 | 122 | L0A46: DEC HL 123 | CALL L0FB2 124 | DEC A 125 | AND 03h 126 | DJNZ L0A3D 127 | RET 128 | 129 | L0A50: DB 00h 130 | 131 | ; --- START PROC L0A51 --- 132 | L0A51: LD A,(L0A5F) 133 | OR A 134 | 135 | The `--xref` option, causes the referencing locations of any label to also be included: 136 | 137 | 138 | ; Referenced from 09BEh 139 | L09C4: LD (HL),8Ch 140 | JR L09CE 141 | 142 | ; Referenced from 09BAh 143 | L09C8: LD (HL),0B0h 144 | JR L09CE 145 | 146 | ; Referenced from 09B6h 147 | L09CC: LD (HL),80h 148 | 149 | ; Referenced from 09C2h, 09CAh, 09C6h 150 | L09CE: INC A 151 | CALL L0FB2 152 | AND 03h 153 | ADD HL,DE 154 | DJNZ L09B5 155 | LD A,(L0A50) 156 | LD B,40h ; '@' 157 | CP 03h 158 | 159 | If an instruction references a memory address that not aligned with the start of an instruction, its 160 | disassembly is updated to use the instruction's label with an offset. This usually occurs with self 161 | modifying code and helps to produce a listing that can be directly re-assembled. 162 | 163 | LD (L0BED+1),A ; reference not aligned to instruction 164 | L0BED: SET 3,(HL) 165 | 166 | 167 | In listing mode (`--lst`), the address and byte code is included on the left: 168 | 169 | ; Entry Point 170 | ; --- START PROC L0900 --- 171 | 0900: 3E 0A L0900: LD A,0Ah 172 | 0902: D3 0C OUT (0Ch),A 173 | 0904: 3E 2F LD A,2Fh ; '/' 174 | 0906: D3 0D OUT (0Dh),A 175 | 0908: 21 00 F8 LD HL,0F800h 176 | 090B: 0E 80 LD C,80h 177 | 090D: 59 L090D: LD E,C 178 | 090E: 16 03 LD D,03h 179 | 0910: AF L0910: XOR A 180 | 181 | Listing mode also causes the generation of reference information, including references to external memory addresses: 182 | 183 | references to external address 8009: 184 | 0F18 CALL 8009h 185 | 0F43 CALL 8009h 186 | 0F66 CALL 8009h 187 | 21E7 CALL 8009h 188 | 236E CALL 8009h 189 | 2373 CALL 8009h 190 | 191 | references to external address F0E2: 192 | 2354 LD (0F0E2h),A 193 | 194 | Possible address references are also listed. This includes any instruction that uses a literal word value. 195 | 196 | possible references to internal address 0900: 197 | 200E LD BC,0900h 198 | 201E LD BC,0900h 199 | 2037 LD BC,0900h 200 | 204F LD BC,0900h 201 | 202 | possible references to internal address 0A5F: 203 | 0A60 LD HL,0A5Fh 204 | ---------- 205 | 0A51 LD A,(L0A5F) 206 | 105B LD A,(L0A5F) 207 | 208 | *(Note the instructions after the dashed separator are references to the same literal value, but instances where it's known to be an address.)* 209 | 210 | Possible references to external addresses are listed separately since they're less likely to need patching to make a source file for assembly: 211 | 212 | possible references to external address CC00: 213 | 0DCF LD BC,0CC00h 214 | 215 | possible references to external address F000: 216 | 096F LD HL,0F000h 217 | 0A8D LD HL,0F000h 218 | 0AA2 LD DE,0F000h 219 | 0BDD LD DE,0F000h 220 | 0C9C LD HL,0F000h 221 | 0E17 LD DE,0F000h 222 | 1485 LD HL,0F000h 223 | 224 | Port references are also listed: 225 | 226 | references to port 02h 227 | 0C83 IN A,(02h) 228 | 0C95 IN A,(02h) 229 | 0FCA IN A,(02h) 230 | 0FDA IN A,(02h) 231 | 0C87 OUT (02h),A 232 | 0C99 OUT (02h),A 233 | 0FCE OUT (02h),A 234 | 0FDE OUT (02h),A 235 | 236 | references to port 0Bh 237 | 094F OUT (0Bh),A 238 | 096A OUT (0Bh),A 239 | 240 | The listing file also includes a few metrics on all the located procedures: 241 | 242 | Procedures (96): 243 | Proc Length References Dependants 244 | L0900 0032 0 1 245 | L0932 003D 5 0 246 | L096F 0032 2 0 247 | L09A1 00AF 6 1 248 | L0A51 000E 6 3 249 | L0A60 000E 1 0 250 | 251 | and a call graph. Entry points, external routines and recursive routines are highighted: 252 | 253 | Call Graph: 254 | L0900 - Entry Point 255 | L1042 256 | L0BF0 257 | L0A6E 258 | 8009h - External 259 | L0A51 260 | L0AB4 261 | L102E 262 | L1000 263 | L0A51 - Recusive 264 | L0FB2 265 | L0B93 266 | -------------------------------------------------------------------------------- /disassemble.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM 4 | REM Disassembles "Pyramid Warp (1983) (T&E Soft) (J).rom" 5 | REM MD5: 6b 9f 3f 0c 3a 6d 1d 6a bd 3d 4a 45 89 cc dd 1f 6 | REM 7 | yazd.exe "rom\PyramidWarp.rom" "rom\PyramidWarp.asm" @"rom\PyramidWarp.yazd" 8 | 9 | REM 10 | REM Tests the disassembly 11 | REM 12 | tniasm.exe "rom\PyramidWarp.asm" ".\disassembly.rom" 13 | fc /b "rom\PyramidWarp.rom" ".\disassembly.rom" 14 | del tniasm.sym tniasm.tmp ".\disassembly.rom" 15 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # tools 4 | # 5 | 6 | ASM=tniasm 7 | EMULATOR=cmd /c start 8 | PNG2MSX=png2msx 9 | PNG2SPR=png2spr 10 | TMX2BIN=tmx2bin 11 | ZX0=zx0.exe 12 | 13 | # 14 | # commands 15 | # 16 | 17 | COPY=cmd /c copy 18 | MKDIR=cmd /c mkdir 19 | MOVE=cmd /c move 20 | REMOVE=cmd /c del 21 | RENAME=cmd /c ren 22 | 23 | # 24 | # paths and file lists 25 | # 26 | 27 | ORIGINAL_DATAS=\ 28 | asm\original\charset.png.chr \ 29 | asm\original\charset.png.clr \ 30 | asm\original\font.png.chr \ 31 | asm\original\font.png.clr \ 32 | asm\original\sprites.png.spr 33 | 34 | ENHANCED_DATAS=\ 35 | asm\enhanced\charset.png.chr \ 36 | asm\enhanced\charset.png.clr \ 37 | asm\enhanced\charset_0.png.chr \ 38 | asm\enhanced\charset_0.png.clr \ 39 | asm\enhanced\font.png.chr \ 40 | asm\enhanced\font.png.clr \ 41 | asm\enhanced\sprites.png.spr \ 42 | asm\enhanced\sprites4d.png.spr 43 | 44 | ENHANCEDPLUS_DATAS=\ 45 | asm\enhancedplus\charset.png.chr.zx0 \ 46 | asm\enhancedplus\charset.png.clr.zx0 \ 47 | asm\enhancedplus\sprites.png.spr.zx0 \ 48 | asm\enhancedplus\screen_title.tmx.bin.zx0 \ 49 | asm\enhancedplus\screen_ingame.tmx.bin.zx0 \ 50 | asm\enhancedplus\init.bin.zx0 \ 51 | asm\enhancedplus\sfx\PW_Dead2.pt3.hl.zx0 \ 52 | asm\enhancedplus\sfx\PW_level1_A.pt3.hl.zx0 \ 53 | asm\enhancedplus\sfx\PW_level1_B.pt3.hl.zx0 \ 54 | asm\enhancedplus\sfx\PW_level1_C.pt3.hl.zx0 \ 55 | asm\enhancedplus\sfx\PW_level1_ONLY_FIRST_TIME.pt3.hl.zx0 \ 56 | asm\enhancedplus\sfx\PW_level2_A.pt3.hl.zx0 \ 57 | asm\enhancedplus\sfx\PW_level2_B.pt3.hl.zx0 \ 58 | asm\enhancedplus\sfx\PW_level2_C.pt3.hl.zx0 \ 59 | asm\enhancedplus\sfx\PW_level3_A.pt3.hl.zx0 \ 60 | asm\enhancedplus\sfx\PW_level3_B.pt3.hl.zx0 \ 61 | asm\enhancedplus\sfx\PW_level3_C.pt3.hl.zx0 \ 62 | asm\enhancedplus\sfx\PW_LevelFinished.pt3.hl.zx0 \ 63 | asm\enhancedplus\sfx\PW_NewGame.pt3.hl.zx0 \ 64 | asm\enhancedplus\sfx\PW_Sphinx_IN.pt3.hl.zx0 \ 65 | asm\enhancedplus\sfx\PW_Sphinx_IN2.pt3.hl.zx0 \ 66 | asm\enhancedplus\sfx\PW_Sphinx_OUT.pt3.hl.zx0 67 | 68 | ENHANCEDPLUS_STATIC_DATAS=\ 69 | asm\enhancedplus\mapper\rooms_original.asm \ 70 | asm\enhancedplus\mapper\rooms.asm \ 71 | asm\enhancedplus\test.afb 72 | 73 | # 74 | # phony targets 75 | # 76 | 77 | # default target (just the enhancedplus version) 78 | default: rom\PyramidWarp.enhancedplus.rom 79 | 80 | clean: 81 | $(REMOVE) rom\PyramidWarp.enhancedplus.rom $(ENHANCEDPLUS_DATAS) 82 | $(REMOVE) $(SYMS) tniasm.sym tniasm.tmp 83 | 84 | cleanall: 85 | $(REMOVE) rom\PyramidWarp.original.rom 86 | $(REMOVE) rom\PyramidWarp.enhanced.rom $(ORIGINAL_DATAS) $(ENHANCED_DATAS) 87 | $(REMOVE) rom\PyramidWarp.enhancedplus.rom $(ENHANCEDPLUS_DATAS) 88 | $(REMOVE) $(SYMS) tniasm.sym tniasm.tmp 89 | 90 | compileall: rom\PyramidWarp.original.rom rom\PyramidWarp.enhanced.rom rom\PyramidWarp.enhancedplus.rom 91 | 92 | test: rom\PyramidWarp.enhancedplus.rom 93 | $(EMULATOR) $< 94 | 95 | # 96 | # main targets 97 | # 98 | 99 | rom\PyramidWarp.original.rom: asm\PyramidWarp.annotated.asm 100 | $(ASM) $< $@ 101 | cmd /c findstr /b /i "debug_" tniasm.sym | sort 102 | 103 | rom\PyramidWarp.enhanced.rom: asm\PyramidWarp.enhanced.asm $(ORIGINAL_DATAS) $(ENHANCED_DATAS) 104 | $(ASM) $< $@ 105 | cmd /c findstr /b /i "debug_" tniasm.sym | sort 106 | 107 | rom\PyramidWarp.enhancedplus.rom: asm\PyramidWarp.enhancedplus.asm asm\symbols.asm $(ENHANCEDPLUS_DATAS) $(ENHANCEDPLUS_STATIC_DATAS) 108 | $(ASM) $< $@ 109 | cmd /c findstr /b /i "debug_" tniasm.sym | sort 110 | 111 | asm\enhancedplus\init.bin: asm\enhancedplus\init.asm 112 | $(ASM) $< $@ 113 | 114 | asm\enhancedplus\sfx\PW_Dead2.pt3.hl \ 115 | asm\enhancedplus\sfx\PW_level1_A.pt3.hl \ 116 | asm\enhancedplus\sfx\PW_level1_B.pt3.hl \ 117 | asm\enhancedplus\sfx\PW_level1_C.pt3.hl \ 118 | asm\enhancedplus\sfx\PW_level1_ONLY_FIRST_TIME.pt3.hl \ 119 | asm\enhancedplus\sfx\PW_level2_A.pt3.hl \ 120 | asm\enhancedplus\sfx\PW_level2_B.pt3.hl \ 121 | asm\enhancedplus\sfx\PW_level2_C.pt3.hl \ 122 | asm\enhancedplus\sfx\PW_level3_A.pt3.hl \ 123 | asm\enhancedplus\sfx\PW_level3_B.pt3.hl \ 124 | asm\enhancedplus\sfx\PW_level3_C.pt3.hl \ 125 | asm\enhancedplus\sfx\PW_LevelFinished.pt3.hl \ 126 | asm\enhancedplus\sfx\PW_NewGame.pt3.hl \ 127 | asm\enhancedplus\sfx\PW_Sphinx_IN.pt3.hl \ 128 | asm\enhancedplus\sfx\PW_Sphinx_IN2.pt3.hl \ 129 | asm\enhancedplus\sfx\PW_Sphinx_OUT.pt3.hl: \ 130 | asm\enhancedplus\sfx\headerless.asm \ 131 | asm\enhancedplus\sfx\PW_Dead2.pt3 \ 132 | asm\enhancedplus\sfx\PW_level1_A.pt3 \ 133 | asm\enhancedplus\sfx\PW_level1_B.pt3 \ 134 | asm\enhancedplus\sfx\PW_level1_C.pt3 \ 135 | asm\enhancedplus\sfx\PW_level1_ONLY_FIRST_TIME.pt3 \ 136 | asm\enhancedplus\sfx\PW_level2_A.pt3 \ 137 | asm\enhancedplus\sfx\PW_level2_B.pt3 \ 138 | asm\enhancedplus\sfx\PW_level2_C.pt3 \ 139 | asm\enhancedplus\sfx\PW_level3_A.pt3 \ 140 | asm\enhancedplus\sfx\PW_level3_B.pt3 \ 141 | asm\enhancedplus\sfx\PW_level3_C.pt3 \ 142 | asm\enhancedplus\sfx\PW_LevelFinished.pt3 \ 143 | asm\enhancedplus\sfx\PW_NewGame.pt3 \ 144 | asm\enhancedplus\sfx\PW_Sphinx_IN.pt3 \ 145 | asm\enhancedplus\sfx\PW_Sphinx_IN2.pt3 \ 146 | asm\enhancedplus\sfx\PW_Sphinx_OUT.pt3 147 | $(ASM) $< 148 | 149 | # 150 | # GFXs targets 151 | # 152 | 153 | asm\enhancedplus\charset.png.chr: \ 154 | asm\enhancedplus\charset_font.png.chr \ 155 | asm\enhancedplus\charset_ingame.png.chr \ 156 | asm\enhancedplus\charset_extra.png.chr 157 | $(COPY) /b \ 158 | asm\enhancedplus\charset_font.png.chr \ 159 | + asm\enhancedplus\charset_ingame.png.chr \ 160 | + asm\enhancedplus\charset_extra.png.chr \ 161 | $@ 162 | 163 | asm\enhancedplus\charset.png.clr: \ 164 | asm\enhancedplus\charset_font.png.clr \ 165 | asm\enhancedplus\charset_ingame.png.clr \ 166 | asm\enhancedplus\charset_extra.png.clr 167 | $(COPY) /b \ 168 | asm\enhancedplus\charset_font.png.clr \ 169 | + asm\enhancedplus\charset_ingame.png.clr \ 170 | + asm\enhancedplus\charset_extra.png.clr \ 171 | $@ 172 | 173 | %.png.chr %.png.clr: %.png 174 | $(PNG2MSX) -hl $< 175 | 176 | %.png.spr: %.png 177 | $(PNG2SPR) $< 178 | 179 | %.tmx.bin: %.tmx 180 | $(TMX2BIN) $< $@ 181 | 182 | # 183 | # Packed targets 184 | # 185 | 186 | %.chr.zx0: %.chr 187 | $(REMOVE) $@ 188 | $(ZX0) $< 189 | 190 | %.clr.zx0: %.clr 191 | $(REMOVE) $@ 192 | $(ZX0) $< 193 | 194 | %.spr.zx0: %.spr 195 | $(REMOVE) $@ 196 | $(ZX0) $< 197 | 198 | %.hl.zx0: %.hl 199 | $(REMOVE) $@ 200 | $(ZX0) $< 201 | 202 | %.bin.zx0: %.bin 203 | $(REMOVE) $@ 204 | $(ZX0) $< 205 | -------------------------------------------------------------------------------- /reassemble.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | REM 4 | REM Reassembles the annotated disassembly 5 | REM 6 | tniasm.exe "asm\PyramidWarp.annotated.asm" ".\annotated.rom" 7 | fc /b "rom\PyramidWarp.rom" ".\annotated.rom" 8 | del tniasm.sym tniasm.tmp 9 | -------------------------------------------------------------------------------- /rom/PyramidWarp.enhanced.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/rom/PyramidWarp.enhanced.rom -------------------------------------------------------------------------------- /rom/PyramidWarp.enhancedplus.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theNestruo/msx-pyramidwarpex/368ed78d7f7b193a2eecd1942f00ca377177d281/rom/PyramidWarp.enhancedplus.rom -------------------------------------------------------------------------------- /rom/PyramidWarp.rom.md5: -------------------------------------------------------------------------------- 1 | MD5 hash of file Pyramid Warp (1983) (T&E Soft) (J).rom: 2 | 6b 9f 3f 0c 3a 6d 1d 6a bd 3d 4a 45 89 cc dd 1f 3 | -------------------------------------------------------------------------------- /rom/PyramidWarp.yazd: -------------------------------------------------------------------------------- 1 | --addr:0x8000 --entry:0x8010 --lowercase --xref --markwordrefs 2 | --------------------------------------------------------------------------------