Changes

No$cart

3,148 bytes added, 20:32, 19 February 2018
A utility by [[Nocash]] which converts a disk image to a cartridge.
httpProblems://nocash.emubase.de/* The generated cartridges do not work on GX4000 or 464Plus* If there are expansion ROMs then these will be activated when the cart is started which can cause compatibility issues* The tool is a 16-bit DOS program so doesn't work on new versions of Windows
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.To solve these problems [[Arnoldemu]] has made a new version [[Nocart]]
In addition if the game/program has any of the following it will not work on GX4000:
* It uses 128K ONLY (or it's a bad "crack" that requires 128K to work even though the game itself would work in 64K).
If a game has any of the following then it can't be used from cartridge:* Saving progress or hi-scores* Requires expansion ROMs* Direct access to disc for loading* Disk has copy protection. However, the tool is easy for the non-programmer to use. == No$cart package == The No$cart package (available from the No$cash website) contains:* a NO$CPC.COM executable file that can be run by DOS/Windows (can't be run on 64-bit windows e.g. windows 8), * a NO$CPC.ROM file (which contains the OS, BASIC and Amsdos - in theory you can then use your own patched versions). The ROM is unpatched. The .COM file patches the ROM.* a NO$CPC.TXT readme document.
== Technical ==
Page 0 is OS.
Page 1 is BASIC.
Page 2 contains part of the disk image data.
Page 3 contains AMSDOS.
Page 4 onwards -15 contains disk image data.
The OS, BASIC and AMSDOS are based on CPC6128 ROMs and have all been patched.
 
Note that expansion ROMs that have been installed (e.g. replacement AMSDOS such as Parados) on the Plus will override the AMSDOS in the cartridge made by No$cart. So ensure you remove all expansion ROMs before running the cart on the Plus.
 
The tool supports single sided DATA format discs only. The data stored in the cartridge is uncompressed and is a dump of each sector's data ordered by sector ID (&c1 then &c2 then &c3 etc).
 
Page 2 is the first 32 sectors from the disc which holds the directory and first part of the data.
Page 4-15 contains all the remaining data from the disc.
 
A single side of a standard DATA format disc is 178K which uses 12 cartridge pages (the last page is not fully used and is padded with FF bytes by No$cart). Therefore No$cart uses a 256KB cartridge to store an entire disk.
 
The maximum size of uncompressed data that could be stored is 475136 bytes. Two sides of a DATA format disc would be 356K (40 tracks and 2 sides).
It would not be possible to store a double sided 80 track disc.
 
Discs of other disc formats would need different patched AMSDOS to handle them.
 
=== OS patches ===
CALL &d583
* Part of the text "Random number seed ?" at offset &1583 (&D583 in the CPU address space) has been patched with the following codewhich will autotype a command into basic:
ld hl,&ac8a
The DOS/AMSDOS rom has been patched in the following way:
 
* At offset &56D instead of:
 
CALL &c976
 
there is:
ld a,&c1
jr &c581
 
 
* At offset &62D instead of:
CALL &c638
 
there is:
 
scf
ret
defb &c6
 
* At offset &64D instead of:
ld a,&45
 
there is:
 
scf
ret
 
* At offset &652 instead of:
ld a,&4d
 
there is:
 
scf
ret
 
* At offset &666 instead of:
call &c976
 
there is:
 
jp &dc00
 
 
* At offset &763 instead of:
 
CALL &c976
 
there is:
SCF
RET
* At offset &1c00 the following code has been added (on CPC this is filled with 0x0ff):
1c00 c314dc jp 0dc14h
1c03 c35adc jp 0dc5ah ;; os calls this on startup.
;; this is the command to run
1c06:
defb &aa ;; command to autorun from basic
defb 'RUN"DISC',0
defb 'ST2',0
1c14 f3 di
1c15 c5 push bc
1c4c fb ei
1c4d c9 ret
1c4e ed79 out (c),a
1c50 0602 ld b,02h
1c57 ed49 out (c),c
1c59 c9 ret
;; called by OS on startup
1c5a cd96dc call 0dc96h ;; unlock plus features
1c5d 01b87f ld bc,7fb8h ;; page in plus registers
1c68 010e00 ld bc,000eh
1c6b edb0 ldir
1c6d 21b5dc ld hl,0dcb5h ;; location of stored palette 1c70 112264 ld de,6422h ;; plus sprite palettein plus registers 1c73 0e08 ld c,08h ;; 2*4 (2 bytes per palette entry, 4 entries)
1c75 edb0 ldir
1c77 110040 ld de,4000h ;; plus sprite ram
;; unpack pixels into sprite ram 1c7a 7e ld a,(hl) ;; read byte containing 2 pixels (one in upper nibble, other in lower nibble) 1c7b 0f rrca ;; transfer upper nibble into lower nibble
1c7c 0f rrca
1c7d 0f rrca
1c7e 0f rrca
1c7f 12 ld (de),a ;; store in sprite ram 1c80 1c inc e ;; update sprite ram pointer 1c81 eda0 ldi ;; (DE) = (HL). Writes lower nibble into sprite pixel data.
1c83 03 inc bc
1c84 10f4 djnz 1c7ah ;; loop for more sprite pixels 1c86 1660 ld d,60h ;; plus sprite coordinatesand magnification 1c88 0e0d ld c,0dh ;; (X,Y, magnification for 2 sprites)
1c8a edb0 ldir
1c8c 01a07f ld bc,7fa0h ;; page out plus registers
1c8f ed49 out (c),c
;; lock plus
1c91 0110bc ld bc,0bc10h
1c94 1803 jr 1c99h
1c96 0111bc ld bc,0bc11h
1c99 21a4dc ld hl,0dca4h ;; plus unlock sequence
1ca1 20f9 jr nz,1c9ch
1ca3 c9 ret
;; plus unlock sequence
1ca4
defb &ff,&00,&ff,&77,&b3,&51,&a8,&d4,&62,&39,&9c,&46,&2b,&15,&8a,&cd,&ee
1cb5:
defw &07
defw &077f
defw &0fff
;; sprite pixels 1cbd defb &1 ;; &1cbe-&1dbc is 0 defs 254
1dbd 04 inc b
1dbe 00 nop
1dc6 00 nop
1dc7 010009 ld bc,0900h
 
== Links ==
 
* http://problemkaputt.de
* http://problemkaputt.de/no$cart.htm
 
[[Category:Software]]
1,377
edits