Steps to create a Z80 Assembly Development Environment for the ZX Spectrum Next:
14:30
SPECNEXT LINK:
https://specnext.dev/tutorials/creating-a-z80-assembly-development-environment-on-windows/
15:30
1. Create the folder structure.
C:\NextDev
SDCard
Project1
Bin (for tools)
Src (Z80 source code)
Data (optional for misc data)
Etc (notes, etc)
22:10
2. Download the ZX Spectrum Next image and save the .zip file to the "SDCard" folder.
http://zxspectrumnext.online/cspect/
25:25
3. Unzip the image file (cspect-next-2gb.img) and copy it to the "SDCard" folder.
27:20
4. Copy the extracted .rom files (enNextZX.rom, enNxtmmc.rom) to the "bin" folder.
29:02
5. Download the CSpect emulator from http://cspect.org/ and unzip the contents to the "bin" folder.
32:18
6. Download and install openal sound driver https://www.openal.org/downloads/
34:30 Testing the CSpect emulator
36:20
7. Download sjasmplus assembler from https://github.com/z00m128/sjasmplus/releases/tag/v1.18.3
38:00
8. Unzip the sjasmplus.exe file and save it to the "bin" folder. (It must be with the CSpect emulator files).
40:00
9. (Optional) Dowload hdfmonkey and extract the hdfmonkey.exe file to the "bin" folder https://uto.speccy.org/
46:45
10. Download and install Sublime Text editor. https://www.sublimetext.com/download
49:50
11. Download z80asm plugin for Sublime Text editor. https://github.com/psbhlw/sublime-text-z80asm
51:52
12. Unzip the z80asm zip file and copy the "z80asm" folder to the "packages" folder in the Sublime Text installation.
54:33
13. Download the language file for the z80asm plugin to recognize the new ZX Spectrum Next z80 opcodes Extract the zip file and copy the z80asm.tmLanguage file to the "z80asm" folder within the "packages" folder in the Sublime Text installation. (It will overwrite the existing language file).
1:00:20
15. (Optional if you have the skills) Customize the build.bat file in the "z80asm" folder in the Sublime Text installation.
1:02:19
16. Use an editor (Sublime Text, VSCode, etc) to create a file called project.asm and save it in the "src" folder under the "project1" folder. (Copy and paste the code shown below):
; Allow the Next paging and instructions
DEVICE ZXSPECTRUMNEXT
; Generate a map file for use with Cspect
CSPECTMAP "project.map"
org $8000
Start:
ld a,4 ; Set A to green
out ($fe),a ; Change the border
jr $ ; Loop forever!
;;
;; Set up the Nex output
;;
; This sets the name of the project, the start address,
; and the initial stack pointer.
SAVENEX OPEN "project.nex", Start, $ff40
SAVENEX CORE 2,0,0
SAVENEX CFG 7,0,0,0
; Generate the Nex file automatically based on which pages you use.
SAVENEX AUTO
1:04:30
17. Check this link for explanations of the SAVENEX options in the program listing above https://z00m128.github.io/sjasmplus/documentation.html#c_savenex
1:05:20
18. Use windows notepad to create a text file called m.bat and save it in the "project1" folder. Running this batch file will create the project.nex and project.map files from the project.asm file saved above (Copy and paste the code below)
@echo off
bin\sjasmplus src/project.asm --zxnext=cspect --msg=war
1:10:47
19. Use windows notepad to create a text file called r.bat and save it in the "project1" folder. Running this batch file will automatically run the project.nex file in the CSpect emulator (Copy and paste the code below)
bin\CSpect.exe -r -brk -w3 -60 -vsync -zxnext -nextrom -map=project.map -mmc=./ project.nex
1:13:50
20. Use windows notepad to create a make.bat file and save it in the "project1" folder. This is a combination of the m.bat and r.bat files created above and will create the project.nex and project.map files from the project.asm file and automatically run the project.nex file in the CSpect emulator (Copy and paste the code below)
@echo off
bin\sjasmplus src/project.asm --zxnext=cspect --msg=war
bin\CSpect.exe -r -brk -w3 -60 -vsync -zxnext -nextrom -map=project.map -mmc=./ project.nex
1:28:10 Using a command window to speed up the process
21. Go make some games!
Public Facebook Page:
https://patreon.com/Spriteworx
Private facebook group for Patreon subscribers:
Content (as it becomes available):
https://spriteworx.itch.io/