Difference between revisions of "Programming:Cross Development"

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search
m (added category)
(Added a little linux section for tools... still need some work to get a complete howto)
Line 1: Line 1:
== General ==
+
= Introduction =
 +
Cross development is a development method where you use another machine (the host) to develop programs for the CPC (target). This is interesting because you can make a big program wich sourcecode does not even fit on the CPC ram.
  
There are various Z80 assemblers which you can use to develop games for the CPC.
+
The main drawback is that transferring the compiled code to the CPC can be quite difficult. But there are pretty good emulators wich you can use for testing.
I always test on an emulator first then when the program is complete I test it on a real CPC.
+
  
 
Once you have your binary file you have two choices depending on if the game will be for cassette or disc.
 
Once you have your binary file you have two choices depending on if the game will be for cassette or disc.
  
=== Cassette ===
+
= Tools needed for cross development=
  
* Use 2CDT to add the files to a Cassette Image File (CDT)
+
== Linux ==
* Then you can run the program on the emulator the same way as you would run it on a real CPC
+
  
=== Disc ===
+
=== Cross assemblers ===
 +
* [[sjasm]]
 +
* [[ZMac]]
  
* Use CPCFS or CPCXFS to put the binary files into a Disk Image file (DSK)
+
=== Disc management ===
* Then you can run the program on the emulator the same way as you would run it on a real CPC
+
* [[cpcfs]] / [[cpcxfs]]
 
+
* [[dsktools]]
=== Snapshot ===
+
 
+
The fastest way of testing your code on an emulator is by creating a snapshot. Use CPCSnapshot to insert your assembled code into a snapshot file. Then just load the snapshot file into the emulator. Windows users may also try WinAPE's integrated assembler which assembles the code directly into the emulated CPC's memory.
+
  
 +
== Windows ==
  
 
=== Cross Assemblers ===
 
=== Cross Assemblers ===
  
 +
*[[tasm]]
 
*[[Pasmo]]
 
*[[Pasmo]]
*ZMac
+
*[[ZMac]]
 
*[http://little-bat.de/prog/ zasm]
 
*[http://little-bat.de/prog/ zasm]
 
*[[WinApe]]'s built in assembler
 
*[[WinApe]]'s built in assembler
Line 32: Line 32:
 
=== For cassette ===
 
=== For cassette ===
  
- Use Tape2WAV to convert the Cassette Image file (CDT) into a WAV file.
+
* 2CDT to add the files to a Cassette Image File (CDT)
- Connect your CPC (CPC664 and CPC6128 have a cassette input) to the Line-Out output of your PC soundcard
+
* Tape2WAV to convert the Cassette Image file (CDT) into a WAV file.
- On the CPC type:  
+
* Then you can run the program on the emulator the same way as you would run it on a real CPC, or
 +
* Connect your CPC (CPC664 and CPC6128 have a cassette input) to the Line-Out output of your PC soundcard
 +
* On the CPC type:  
 
|TAPE:RUN"
 
|TAPE:RUN"
- Start your WAV player
+
* Start your WAV player
- Set the volume to maximum
+
* Set the volume to maximum
- play the WAV file
+
* play the WAV file
- Wait for the program to load...
+
* Wait for the program to load...
  
 
=== For disc ===
 
=== For disc ===
 +
 +
* Use CPCFS or CPCXFS to put the binary files into a Disk Image file (DSK)
 +
* Then you can run the program on the emulator the same way as you would run it on a real CPC
  
 
If your CPC has a 3.5" disc drive then the easiest method is to transfer the DSK to a 3.5" disc using the PC.
 
If your CPC has a 3.5" disc drive then the easiest method is to transfer the DSK to a 3.5" disc using the PC.
Line 48: Line 53:
 
- Put the disc into your CPC's 3.5" disc drive and type
 
- Put the disc into your CPC's 3.5" disc drive and type
 
- |B: RUN "<gamename>
 
- |B: RUN "<gamename>
 +
 +
== Snapshots ==
 +
 +
The fastest way of testing your code on an emulator is by creating a snapshot. Use [[CPCSnapshot]] to insert your assembled code into a snapshot file. Then just load the snapshot file into the emulator. Windows users may also try WinAPE's integrated assembler which assembles the code directly into the emulated CPC's memory.
  
 
== Web links ==
 
== Web links ==

Revision as of 09:21, 15 April 2008

Introduction

Cross development is a development method where you use another machine (the host) to develop programs for the CPC (target). This is interesting because you can make a big program wich sourcecode does not even fit on the CPC ram.

The main drawback is that transferring the compiled code to the CPC can be quite difficult. But there are pretty good emulators wich you can use for testing.

Once you have your binary file you have two choices depending on if the game will be for cassette or disc.

Tools needed for cross development

Linux

Cross assemblers

Disc management

Windows

Cross Assemblers

Testing on a real CPC

For cassette

  • 2CDT to add the files to a Cassette Image File (CDT)
  • Tape2WAV to convert the Cassette Image file (CDT) into a WAV file.
  • Then you can run the program on the emulator the same way as you would run it on a real CPC, or
  • Connect your CPC (CPC664 and CPC6128 have a cassette input) to the Line-Out output of your PC soundcard
  • On the CPC type:

|TAPE:RUN"

  • Start your WAV player
  • Set the volume to maximum
  • play the WAV file
  • Wait for the program to load...

For disc

  • Use CPCFS or CPCXFS to put the binary files into a Disk Image file (DSK)
  • Then you can run the program on the emulator the same way as you would run it on a real CPC

If your CPC has a 3.5" disc drive then the easiest method is to transfer the DSK to a 3.5" disc using the PC.

- Then use CPCDiskXP to write the DSK to a 3.5" disc drive - Put the disc into your CPC's 3.5" disc drive and type - |B: RUN "<gamename>

Snapshots

The fastest way of testing your code on an emulator is by creating a snapshot. Use CPCSnapshot to insert your assembled code into a snapshot file. Then just load the snapshot file into the emulator. Windows users may also try WinAPE's integrated assembler which assembles the code directly into the emulated CPC's memory.

Web links