Difference between revisions of "Testing library samples"

From MSX Game Library

(β†’β€ŽSamples)
 
(8 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
{|
 
{|
 
|-
 
|-
βˆ’
|πŸ“ <tt>projects</tt>    ||
+
|<tt>πŸ“ projects</tt>    ||
 
|-
 
|-
βˆ’
|β”œβ”€πŸ“ <tt>samples</tt>  || Modules sample programs (VDP, PSG, Sprite, Print, etc.)
+
|<tt>β”œβ”€πŸ“ samples</tt>  || Modules sample programs (VDP, PSG, Sprite, Print, etc.)
 
|-
 
|-
βˆ’
|β”œβ”€πŸ“ <tt>targets</tt>  || Samples to test all target (Plain ROM, Mapped ROM, DOS, etc.)
+
|<tt>β”œβ”€πŸ“ targets</tt>  || Samples to test all target (Plain ROM, Mapped ROM, DOS, etc.)
 
|-
 
|-
βˆ’
|β””β”€πŸ“ <tt>template</tt>  || Template sample (can be use as base to create a new program)
+
|<tt>β”œβ”€πŸ“ template</tt>  || MSX1 template program (can be use as base to create your new program)
 +
|-
 +
|<tt>β””β”€πŸ“ template_msx2</tt> || MSX2 template program (can be use as base to create your new program)
 
|}
 
|}
  
Line 15: Line 17:
  
 
Each [[samples|sample]] have 2 files :
 
Each [[samples|sample]] have 2 files :
βˆ’
* <tt>.c</tt> with sample source code
+
* <tt>.c</tt> with sample source code,
βˆ’
* <tt>.cmd</tt> with Build Tool option overwrite
+
* <tt>.js</tt> with [[Build Tool]] option overwrite.
βˆ’
 
 
βˆ’
Execute <tt>build.bat</tt> and type the name of one of the [[samples]]. "s_game" for example.
 
βˆ’
''<u>Note</u>: Please don't try to run [[samples|samples marked as WIP]].''
 
  
βˆ’
Using command-line (CMD.exe) in this directory, you can directly specify the sample to build using the command:
+
From the command-line you can execute <tt>build.bat</tt> (Windows) or <tt>./build.sh</tt> (Linux) plus the name of one of the [[samples]]. "s_game" for example.
 
<pre>build s_game</pre>
 
<pre>build s_game</pre>
  
Line 27: Line 26:
 
<pre>build s_game DOS1</pre>
 
<pre>build s_game DOS1</pre>
  
βˆ’
''<u>Note</u>: If you have [[Install|configured an emulator path]] in <tt>MSXgl\projects\default_config.cmd</tt>, you can edit <tt>build.bat</tt> and change "<tt>set DoRun=0</tt>" to "<tt>set DoRun=1</tt>" to allow auto-launch of the built program.''
+
''<u>Note</u>: If you have [[Install|configured an emulator path]] in <tt>MSXgl\projects\default_config.cmd</tt>, you can edit <tt>project_config.js</tt> and change "<tt>DoRun = false;</tt>" to "<tt>DoRun = true;</tt>" to allow auto-launch of the built program.''
  
 
== Targets ==
 
== Targets ==

Latest revision as of 12:30, 13 January 2024

The MSXgl samples can be tested from their respective directories:

πŸ“ projects
β”œβ”€πŸ“ samples Modules sample programs (VDP, PSG, Sprite, Print, etc.)
β”œβ”€πŸ“ targets Samples to test all target (Plain ROM, Mapped ROM, DOS, etc.)
β”œβ”€πŸ“ template MSX1 template program (can be use as base to create your new program)
β””β”€πŸ“ template_msx2 MSX2 template program (can be use as base to create your new program)

Samples

Each sample have 2 files :

  • .c with sample source code,
  • .js with Build Tool option overwrite.

From the command-line you can execute build.bat (Windows) or ./build.sh (Linux) plus the name of one of the samples. "s_game" for example.

build s_game

You can also overwrite the target format (unless the sample needs a specific target):

build s_game DOS1

Note: If you have configured an emulator path in MSXgl\projects\default_config.cmd, you can edit project_config.js and change "DoRun = false;" to "DoRun = true;" to allow auto-launch of the built program.

Targets

TBC...

Template

TBC...