Chuckie Egg CAS files

Page 1/2
| 2

By Shinobi

Master (152)

Shinobi's picture

03-08-2021, 01:15

Hi ..

I have MSX AX-200, this MSX and Victor HC-80 and MSX AX-150, came with weird RAM layout which is fragmented between Slot0-0 and slot 0-2, like this:
https://www.msx.org/wiki/Sakhr_AX-200

I succeeded with the help of Caslink3 created specially for these MSX versions by Alexey to convert and find thousands of games to CAS files that can work on my MSX, but couldn't find a version of Chuckie Egg and Elevator Action that can work with my MSX:
I tried the File-Hunter Chuckie Egg rom after converting it to CAS and couldn't work.
I tired an alternatives (4 versions) of CAS chuckie egg and they didn't work although they are just 15 KB
I converted a DSK version to ROM using dsk2rom but turned out to be 64K which can't be converted to CAS using Caslink3

I searched for all chuckie egg version on Edicola8Bit website for a working tape version, it showed insufficient RAM or resets the machine, I think there is Slot change code that is doing this.

Can someone help to convert these two games to a CAS compatable with my MSX, for emulation, there is no emulation for AX-200, you can try Victor HC-80 on openMSX

Login or register to post comments

By Shinobi

Master (152)

Shinobi's picture

03-08-2021, 02:18

I am finding the COM file Chuckie.COM on the disk, I think the rom is in there, I want to extract the ROM from it and try it if it works then I will convert it to CAS

By tfh

Prophet (2936)

tfh's picture

03-08-2021, 08:37

Someone heared your request very quickly and I found some new versions of Chuckie Egg in my mailbox thank to GDX. Please have another look on my download site.

By Shinobi

Master (152)

Shinobi's picture

03-08-2021, 20:04

Thank you Mr. Arnaud, I checked your web archive and downloaded them, this version (Chuckie Egg [MSX support fix] (A&F Software).rom) worked on Victor HC-80 with its weird memory layout, tonight i will try it on my Ax-200.

Thank you, now we need Elevator Action that works for MSX Ax-200 and Victor HC-80, i use CAS from Android tablet to load the game so I converted all your ROMs to CAS using Alexey's Caslink3sp and Caslink3spp designed especially for MSX with fragmented RAM layout.

By tfh

Prophet (2936)

tfh's picture

03-08-2021, 20:21

Hi Shinobi.
I'm glad to hear the files worked. The actual person you need to thank is GDX though. I only placed the files online.
As for Elevator Action... We will see if it pops up (or not...)

By Shinobi

Master (152)

Shinobi's picture

03-08-2021, 20:26

Thanks alot for GDX Smile

By tfh

Prophet (2936)

tfh's picture

04-08-2021, 16:00

There might just be a .CAS version of Elevator Action available on my site, thanks to GDX Smile

By Shinobi

Master (152)

Shinobi's picture

05-08-2021, 02:19

Thanks to both of you, I downloaded it but it didn't work on openMSX emulator (using Victor HC-80 machine) since its RAM is fragmented just like my AX-200. I had other two versions of Elevator Action from two Italian CAS magazines from Edicola8Bit site and they both show black screen after loading even in my AX-200 machine.

I am sure gdx will find a solution to this issue.

By gdx

Enlighted (4630)

gdx's picture

05-08-2021, 03:07

Replace CD 24 00 by 00 00 00 at 0FF5h address in the CAS file with hexa editor.

By Shinobi

Master (152)

Shinobi's picture

05-08-2021, 10:45

That worked great, thank you gdx.
I forgot about the ENASLT routine, I used this technique to hack AlAlamiah education cartridges and converted alot of them to CAS, some of them had protection of writing to a location then check the value written, but some I couldn't fisure out how to break their protection.
I will use this method with some of the CAS files that didn't work
I searched about how cas files are formatted and couldn't find anything useful.
Thanks again gdx

By gdx

Enlighted (4630)

gdx's picture

05-08-2021, 12:51

It seems to interest you so here is the method used:

I cut the ROM into two parts.

To load the first part on the 4000h-7FFFh page, I used this RAM search routine. Below is the program.

ENASLT	equ	00024h
RDSLT	equ	0000Ch	; Read a byte in a Slot
RSLREG	equ	00138h	; Read primary Slot REGister
WRSLT	equ	00014h	; Write a byte in a Slot
WSLREG	equ	0013Bh	; Write primary Slot REGister

EXPTBL	equ	0FCC1h	; Slot de la Main-ROM
SLTTBL	equ	0FCC5h
KBUF	equ	0F41Fh	; Temporary data
RAMSLT	equ	KBUF+3

	org	08500h
	
def_RAMAD1:

	ld	hl,04000h
	call	ram_srch
	ld	(0FFF8h),a	; Main-RAM slot ID of the 4000h-7FFFh page

	ld	h,040h
	call	ENASLT		; Select the Main-RAM on 4000h-7FFFh page

	di
	ld	hl,ROM
	ld	de,04000h
	ld	bc,END-ROM
	ldir			; Copy the first half of ROM to 4000h-7FFFh page

	ld	a,(EXPTBL)
	ld	h,040h
	call	ENASLT		; Select the Main-ROM on 4000h-7FFFh page
	ret

; Search RAM on a page
; Input: HL=0000h, 4000h or 8000h
; output: A=slot number and Carry = 0, Carry = 1 if Ram not found 

ram_srch:
	ld	b,4	;Slot primaire
ram_srch_loop:
	ld	a,b
	dec	a
	xor	3
	ld	(RAMSLT),a
	ld	e,a
	
	push	hl
	ld	hl,EXPTBL
	ld	d,0
	add	hl,de
	ld	a,(hl)
	ld	(KBUF),a	; Save secondary slot flag

	pop	hl
	ld	a,h
	exx
	ld	h,a
	ld	l,0

	ld	a,(KBUF)	; Restore secondary slot flag
	rlca
	ld	b,1
	ld	a,(RAMSLT)
	jr	nc,PrimSLT

	ld	b,4	;Slot secondaire
ram_srch_loop2:	
	ld	a,b
	dec	a
	xor	3
	rlca
	rlca
	ld	c,a
	ld	a,(RAMSLT)
	or	c
	or	080h	; Set bit 7
PrimSLT:
	ld	(KBUF+1),a
;	ld	hl,04000h	; Bank 1
	push	bc
	call	RDSLT
	ld	(KBUF+2),a
	pop	bc
	cp	041h
	jr	nz,no_header	; Jump if first byte = "A" (Rom?)

	inc	hl
	ld	a,(KBUF+1)
	push	bc
	call	RDSLT
	pop	bc
	dec	hl
	cp	042h
	jr	z,no_ram	; Jump if second byte <> "B"
no_header:
	ld	a,(KBUF+1)
	push	bc
	call	RDSLT		; Read first byte
	pop	bc
	ld	e,041h
	ld	a,(KBUF+1)
	push	bc
	call	WRSLT		; Write "A" at first byte
	pop	bc
	ld	a,(KBUF+1)
	push	bc
	call	RDSLT		; Read first byte
	pop	bc
	cp	041h
	jr	z,ram_found	; Jump if first byte = "A"
	
no_ram:	
	djnz	ram_srch_loop2	; Go to next Slot if No RAM 
	exx
	djnz	ram_srch_loop	; Go to next Slot if No RAM 
	scf			; Set Carry
	ret

ram_found:
	ld	a,(KBUF+2)
	ld	e,a
	ld	a,(KBUF+1)
	push	af
	or	080h
	call	WRSLT		; Restore first byte value of RAM
	pop	af		; A=Slot of Ram found (without Bit7)
	or	a		; Reset Carry
	ret
ROM:

#insert	"Elevator Action 1.dat"		; First half of ROM 

END:

Here is the routine to load the second part on the 8000h-BFFFh page:

ENASLT	equ	00024h

	org	08500h
	
	jp	ROM_END

ROM:

#insert	"Elevator Action 2.dat"		; Second half of ROM 

ROM_END:

	ld	a,(0FFF8h)
	ld	h,040h
	call	ENASLT

	di
	ld	hl,ROM
	ld	de,08000h
	ld	bc,ROM_END-ROM
	ldir

	ld	a,(0FFF8h)
	ld	c,a
	ld	hl,(04002h)
	jp	(hl)

J'ai ensuite créé les entêtes pour ces deux fichiers à la main.

Header 1:

	db	1F A6 DE BA CC 13 7D 74	; Header marker
	db	D0 D0 D0 D0 D0 D0 D0 D0 D0 D0	; Binary
	db	"ELEVA1"	; 6 characters
	db	1F A6 DE BA CC 13 7D 74
	dw	8500h,C5AAh,8500h	; Start_ADRS,End_ADRS,Exec_ADRS

Header 2:

	db	1F A6 DE BA CC 13 7D 74	; Header marker
	db	D0 D0 D0 D0 D0 D0 D0 D0 D0 D0	; Binary
	db	"ELEVA2"	; 6 characters
	db	1F A6 DE BA CC 13 7D 74
	dw	8500h,C51Fh,8500h	; Start_ADRS,End_ADRS,Exec_ADRS

Then I create this BASIC program on BlueMSX to load the game:

10 SCREEN1
20 LOCATE(PEEK(&HF3AF)/2)-5,11:PRINT"Loading...":KEYOFF
30 BLOAD"cas:ELEVA1",R
40 BLOAD"cas:ELEVA2",R

I saved it as CAS and added at the beginning of the file created previously with a Hexa editor.

I think you can improve the method. Do not forget (like me) to remove in the ROM the CALL 0024h (or the OUT) which selects the ROM at 8000h-BFFFh otherwise it will not work on MSXs with the separate RAM on two slots.

PS: #incbin is often used instead of #insert.

Edit: You must put several 00 between the files in the CAS file (for the each file size to be a multiple of 4 bytes).

Page 1/2
| 2