Difference between revisions of "Create my first program"
From MSX Game Library
Line 19: | Line 19: | ||
Edit <tt>build.bat</tt>: | Edit <tt>build.bat</tt>: | ||
− | * Change ProjName to mygame. | + | * Change <tt>ProjName</tt> to <tt>mygame</tt>. |
− | * Set Machine to the version MSX hardware you want to support for your program. | + | * Set <tt>Machine</tt> to the version MSX hardware you want to support for your program. Let's say <tt>2</tt> for MSX2. |
− | * Set Target to your target format. Let's say ROM_ASCII8 (default ROM size for mapper is 128 KB). | + | * Set <tt>Target</tt> to your target format. Let's say <tt>ROM_ASCII8</tt> (default ROM size for mapper is 128 KB). |
Revision as of 14:38, 16 January 2022
Test template program
First try to compile and run the template program:
- Go to MSXgl\projects\template
- Execute build.bat
- Go to MSXgl\projects\template\emul\rom, check if template.rom exists and try it on your MSX machine or emulator.
Note: If you have configured an emulator path in MSXgl\projects\default_config.cmd, you can edit build.bat and change "set DoRun=0" to "set DoRun=1" to allow auto-launch of the built program.
Create your project directory
Now that everything work well, let's create your own program.
You can sure start a new project from scratch, but for this example lets duplicate template directory an rename it mygame.
Rename template.c<tt> to <tt>mygame.c.
Setup your project
Edit build.bat:
- Change ProjName to mygame.
- Set Machine to the version MSX hardware you want to support for your program. Let's say 2 for MSX2.
- Set Target to your target format. Let's say ROM_ASCII8 (default ROM size for mapper is 128 KB).