using z88dk with Visual Studio

Installing on windows
Post Reply
New member
Posts: 4
Joined: Fri Feb 26, 2016 10:22 pm

using z88dk with Visual Studio

Post by thegouldfish »

I've been using Visual Studio as my development environment and I thought I would share how I went about it.
the first thing I did was make a powershell script to handle the build/clean/rebuild ( ... mpiler.ps1)
you made need to tweak it to your own project so it includes the right clibs, (around line 108) and you can set where it looks for z88dk from the params list at the start.

next I made a new nmake project in Visual Studio, this allows you to specify what you use for building your target.
right click on the project and select properties and select the nmake option and add the following for build, rebuild, clean:
powershell -ExecutionPolicy Bypass $(SolutionDir)compiler.ps1 -Action "Build" -SourceLocation $(ProjectDir) -OutFolder $(ProjectDir) -AssemblyName $(MSBuildProjectName) -ObjectFolder $(ProjectDir) -Flavour $(Configuration)
powershell -ExecutionPolicy Bypass $(SolutionDir)compiler.ps1 -Action "Rebuild" -SourceLocation $(ProjectDir) -OutFolder $(ProjectDir) -AssemblyName $(MSBuildProjectName) -ObjectFolder $(ProjectDir) -Flavour $(Configuration)
powershell -ExecutionPolicy Bypass $(SolutionDir)compiler.ps1 -Action "Clean" -SourceLocation $(ProjectDir) -OutFolder $(ProjectDir) -AssemblyName $(MSBuildProjectName) -ObjectFolder $(ProjectDir) -Flavour $(Configuration)

this will then build a .tap file in either a Release or Debug folder depending you your current configuration flavor (it also adds DEBUG as a define).

I've also set it up to start no$zx when I hit F5, under the debugging tab just set the command to be the emulator, the args to be the .tap location ($(ProjectDir)$(Configuration)\$(MSBuildProjectName).tap) and the working directory to be the location of the emulator.

The powershell has been setup to translate most of the warning and error types into VS compatible ones (so they show up in the error list tab), it doesn't handle the asm errors too well at the moment.

I hope this helps some one else.
Posts: 51
Joined: Fri May 27, 2016 8:58 pm

Post by andydansby »

Hi thegouldfish:

I'm having trouble with getting this setup working, I am using VS2010 express. Do you have a hello world example project, with the files and folder you can share on a google-drive or MS onedrive?

Andy Dansby
Post Reply