Difference between revisions of "Amstrad CPC"

From SizeCoding
Jump to: navigation, search
(sjasmplus with CPC output files support already released some time ago)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Amstrad CPC ==
 
== Amstrad CPC ==
The Amstrad consists of a Z80A @ 3.5 MHz CPU  
+
The Amstrad consists of a Z80A @ 4 MHz CPU  
  
 
=== Setting up ===
 
=== Setting up ===
Setting up:
 
  
* Assembler: -
+
* Cross-Assemblers:
** The emulator [http://www.winape.net/ Winape] has an integrated [http://www.winape.net/help/assembler.html assembler]
+
** [http://www.winape.net/ Winape] has an integrated [http://www.winape.net/help/assembler.html assembler].
** cross-platform [https://github.com/z00m128/sjasmplus/releases/latest SjASMPlus] assembler supports CPC snapshot and CDT files since v1.18.4.
+
** [https://github.com/z00m128/sjasmplus/releases/latest SjASMPlus] cross-platform assembler supports CPC snapshot and CDT files since v1.18.4.
 +
** [https://github.com/EdouardBERGE/rasm/releases/latest Rasm] - extremely fast cross-platform Z80 assembler with many features.
 +
** [https://cpcsdk.github.io/rust.cpclib/basm/ BASM] - a modern Z80 assembler with many features borrowed to mainstream spectrum assemblers, maxam and rasm.
 +
 
 +
* Native-assemblers:
 +
** [http://orgams.wikidot.com/ orgams] - Definitvely the state-of-the-art assembler on Amstrad CPC
  
 
* Emulator(s):  
 
* Emulator(s):  
 
** [http://www.winape.net/ Winape] is very accurate and includes an assembler / debugger
 
** [http://www.winape.net/ Winape] is very accurate and includes an assembler / debugger
 +
** [http://www.roudoudou.com/ACE-DL/ Ace-DL] one of the most accurate emulators / UI is less ergonomic than Winape ATM, but it will improve with time
 
** [https://www.cpc-power.com/cpcarchives/index.php?page=articles&num=445 Caprice] gets very regular updates
 
** [https://www.cpc-power.com/cpcarchives/index.php?page=articles&num=445 Caprice] gets very regular updates
 
** [http://cngsoft.no-ip.org/cpcec.htm CPCEC] is very fast
 
** [http://cngsoft.no-ip.org/cpcec.htm CPCEC] is very fast
 
** [https://sourceforge.net/projects/javacpc/ JavaCPC] offers many features
 
** [https://sourceforge.net/projects/javacpc/ JavaCPC] offers many features
 
** [https://www.retrovirtualmachine.org/ Retro Virtual Machine] is visually very impressive
 
** [https://www.retrovirtualmachine.org/ Retro Virtual Machine] is visually very impressive
 +
** [https://www.amspirit.fr/ Amspirit] another accurate emulator
  
 
=== Video Display ===
 
=== Video Display ===
Line 21: Line 27:
 
=== Sound ===
 
=== Sound ===
 
No information yet
 
No information yet
 +
 +
 +
=== Assumed state at start ===
 +
 +
If the intro is launched with RUN"intro, we can assume those facts
 +
 +
* CRTC R12/R13 = 0x3000
 +
* 0xC000-0xFFFF is filled with byte 0x00
 +
* screen mode is 1
 +
 +
 +
=== On the use of Amsdos Header ===
 +
For the smaller sized competitions, the size of the binary is counted as long as you can provide a (basic) loader so that in theory a user can load the binary file from basic (much like the ZX Spectrum).
 +
 +
In some competitions, Amsdos header counts in the size of the binary. So 128 bytes are lost by definition.
 +
However, there are two small areas that are not used and can embed data !
 +
They are at position 0x1c (36 bytes) and 0x45 (59 bytes) https://www.cpcwiki.eu/index.php?title=AMSDOS_Header.
 +
 +
In some conditions, we can access them :
 +
 +
* If the file (header included) is smaller than 2048-128 bytes, the header is available at address (0xBE7D) + 0xe4 (i.e. 0xbe7d contains an address and 0xe4 bytes later, you have the header). You have access to the two areas
 +
* Otherwise, the BEGINNING of the header is available at address (0xBE7D) + 0x55, and you only have access to the 36 bytes at 0x1c relative position
  
 
=== Additional Resources ===
 
=== Additional Resources ===
 +
* CPC Technical information - https://www.grimware.org/doku.php/documentations/firmware/soft968/start
 +
* CPC Firmware information - https://www.grimware.org/doku.php/documentations/firmware/guide/start
 
* 64 NOPs Amstrad CPC Tech Blog - https://64nops.wordpress.com/
 
* 64 NOPs Amstrad CPC Tech Blog - https://64nops.wordpress.com/

Latest revision as of 11:46, 16 April 2024

Amstrad CPC

The Amstrad consists of a Z80A @ 4 MHz CPU

Setting up

  • Cross-Assemblers:
    • Winape has an integrated assembler.
    • SjASMPlus cross-platform assembler supports CPC snapshot and CDT files since v1.18.4.
    • Rasm - extremely fast cross-platform Z80 assembler with many features.
    • BASM - a modern Z80 assembler with many features borrowed to mainstream spectrum assemblers, maxam and rasm.
  • Native-assemblers:
    • orgams - Definitvely the state-of-the-art assembler on Amstrad CPC
  • Emulator(s):
    • Winape is very accurate and includes an assembler / debugger
    • Ace-DL one of the most accurate emulators / UI is less ergonomic than Winape ATM, but it will improve with time
    • Caprice gets very regular updates
    • CPCEC is very fast
    • JavaCPC offers many features
    • Retro Virtual Machine is visually very impressive
    • Amspirit another accurate emulator

Video Display

No information yet

Sound

No information yet


Assumed state at start

If the intro is launched with RUN"intro, we can assume those facts

  • CRTC R12/R13 = 0x3000
  • 0xC000-0xFFFF is filled with byte 0x00
  • screen mode is 1


On the use of Amsdos Header

For the smaller sized competitions, the size of the binary is counted as long as you can provide a (basic) loader so that in theory a user can load the binary file from basic (much like the ZX Spectrum).

In some competitions, Amsdos header counts in the size of the binary. So 128 bytes are lost by definition. However, there are two small areas that are not used and can embed data ! They are at position 0x1c (36 bytes) and 0x45 (59 bytes) https://www.cpcwiki.eu/index.php?title=AMSDOS_Header.

In some conditions, we can access them :

  • If the file (header included) is smaller than 2048-128 bytes, the header is available at address (0xBE7D) + 0xe4 (i.e. 0xbe7d contains an address and 0xe4 bytes later, you have the header). You have access to the two areas
  • Otherwise, the BEGINNING of the header is available at address (0xBE7D) + 0x55, and you only have access to the 36 bytes at 0x1c relative position

Additional Resources