No$cart

From CPCWiki - THE Amstrad CPC encyclopedia!
Revision as of 08:45, 9 October 2013 by Arnoldemu (Talk | contribs) (BASIC patches)

Jump to: navigation, search

A utility by Nocash which converts a disk image to a cartridge.

http://nocash.emubase.de/

The tool hasn't been tested on the GX4000 so cartridges that are created may not work on it. You should test this to be sure.

In addition if the game/program has any of the following it will not work on GX4000:

  • It uses keyboard or requires keyboard input to get into the game
  • It uses 128K ONLY (or it's a bad "crack" that requires 128K to work even though the game itself would work in 64K).

However, the tool is easy for the non-programmer to use.

Technical

The created cartridge image has the OS, BASIC and Amsdos embedded in it and the data from the disk image (tracks/sectors).

Page 0 is OS.
Page 1 is BASIC.
Page 2 contains part of the disk image data.
Page 3 contains AMSDOS.
Page 4 onwards contains disk image data.

The OS, BASIC and AMSDOS are based on CPC6128 ROMs and have all been patched.

OS patches

The OS ROM has been patched in the following way:

  • Offset &67D has changed from:
call &0723
call &06fc
ld hl,&0688
jr (?)

to:

call &b900   ;; enable upper rom
ld bc,&df07  ;; select upper rom (7 - normally DOS/AMSDOS)
out (c),c
jp &dc03     ;; call into DOS/AMSDOS rom

  • Offset: &1052 and &1053 which define the first 2 colours of the "1st" palette have been changed from &04 to &14. The "1st" and "2nd" palette are swapped between in BASIC to implement flashing colours. &04 is blue. &14 is black.
  • Offset: &1063 and &1064 which define the first 2 colours of the palette "2nd" palette have been changed from &04 to &14. The "1st" and "2nd" palette are swapped between in BASIC to implement flashing colours. &04 is blue, &14 is black.

When the OS starts, the colours are set to black and code patched into the DOS/AMSDOS rom is executed.

BASIC patches

The BASIC ROM has been patched in the following way:

  • Offset &33 has been set to 0. It is the first character of " BASIC 1.1" text.

This stops the BASIC ROM from printing this text.

  • Offset &D7 has been set to 0. It is the first character of "Ready" text. This stops the BASIC ROM from printing this text.
  • At offset &af9, the code has been changed from:
LD HL,&ac8a

to

CALL &d583
  • Part of the text "Random number seed ?" at offset &1583 (&D583 in the CPU address space) has been patched with the following code:
ld hl,&ac8a
ld a,&aa
cp (hl)
ret nz
pop af
ld (hl),' '
scf
ret

When BASIC is started the sign on messages are not displayed, and it auto runs a command-line.