MSXDISK 0.9 BETA: Virtual Floppy Disk Driver over JOYSTICK2 of MSX

صفحة 2/11
1 | | 3 | 4 | 5 | 6 | 7

بواسطة ocitygate

Expert (68)

صورة ocitygate

25-02-2021, 16:55

MSXDOS is crashing, along with some disk games that I tried.
I'm trying to copy some files: COPY A:*.* B:
The DSKIO is requesting to read the sectors to RAM at addresses on page 0 and page 1.
Page 1 in RAM is occupied by the DiskROM.

Is there any way of preventing MSXDOS from overwriting the DiskROM in page 1?

Can someone burn the DiskROM to a cartridge and see if that works?
Where can I buy blank ROM cartridges?

بواسطة ocitygate

Expert (68)

صورة ocitygate

25-02-2021, 16:54

larsthe18th wrote:

Great Job.

Thanks.

larsthe18th wrote:

Shoot, i think my cable can not handle the 67600bps speed,i ordered a USB_TTL-Serial adapter that may work better on higher speed.

Try reducing the 10K resistors to 5K.
And also try without the LEDs.

بواسطة RvS

Expert (72)

صورة RvS

25-02-2021, 18:16

Instead of creating a 'diskrom' in RAM, I tried to patch the disk I/O part and store the driver in a part of the system area.
It is far from ideal, because now the code depends on the exact diskrom version used and you still need a spot in RAM to put the driver. I used the basic 'PLAY' buffer. But you gain 16kof RAM and MSXDOS (EASE!) works.
Here below is the code (for an Arduino solution for a virtual drive)
https://github.com/rolandvans/msxvdisk/blob/master/MSXDISKv1.5.ASM

بواسطة ocitygate

Expert (68)

صورة ocitygate

25-02-2021, 18:28

RvS wrote:

Instead of creating a 'diskrom' in RAM, I tried to patch the disk I/O part and store the driver in a part of the system area.
It is far from ideal, because now the code depends on the exact diskrom version used and you still need a spot in RAM to put the driver. I used the basic 'PLAY' buffer. But you gain 16kof RAM and MSXDOS (EASE!) works.
Here below is the code (for an Arduino solution for a virtual drive)
https://github.com/rolandvans/msxvdisk/blob/master/MSXDISKv1.5.ASM

I saw it.... Great work!
I found the documented source code of the disk drivers - 2 parts: the MSXDOS kernel (DISK.MAC) and the actual driver (DRIVER.MAC)
What needed to be done was implement the DSKIO routine.
maybe 115200 can be achieved but with 2 stop bits... no loop for the bits, just one loop for the bytes.

بواسطة NYYRIKKI

Enlighted (5889)

صورة NYYRIKKI

25-02-2021, 18:36

ocitygate wrote:

Page 1 in RAM is occupied by the DiskROM.

Is there any way of preventing MSXDOS from overwriting the DiskROM in page 1?

Only thing that I can imagine is something like:

	LD A,(7)
	LD H,A
	LD L,0
	LD DE,#3F00
	LD BC,5
	LDIR
	EX DE,HL
	LD (HL),#C3
	INC HL
	LD (HL),6
	INC HL
	LD (HL),A
	LD A,H
	LD (7),A
	LD SP,#3F00
	RST 0

This should prevent programs from using pages 1, 2 or 3 and limit the application memory between #100-#3EFF... but this is just untested theory. Stack may need some more attention.

Quote:

Where can I buy blank ROM cartridges?

ATM at least MSX cartridge shop sells MegaFlashROM and RBSC sells Carnivore2. RBSC at least used to have also SGC if you like to solder your self. I bet there are lot more options, but these came to mind first.

بواسطة Grauw

Ascended (10135)

صورة Grauw

25-02-2021, 18:43

https://www.ebsoft.fr/shop/en/15-msx-hardware MAB 8k/16k Mapper

They’re marked out of stock but you can try to ask Eric if he can make one…

بواسطة RvS

Expert (72)

صورة RvS

25-02-2021, 19:03

ocitygate wrote:

maybe 115200 can be achieved but with 2 stop bits... no loop for the bits, just one loop for the bytes.

Indeed, I have something working, but I need to balance every cycle to make it a bit more robust. My nms8245 for instance does not run at 3.58 MHz but 3.55 MHz...
2 or maybe 1.5 stopbit is required, but it needs an 'auto-tuning part' to compensate for the serial speed that can vary by ~1%.
Work in progress (test only, might only work on 3,55MHz MSX like 8245 and 8220):
https://github.com/rolandvans/msx_softserial/blob/master/rs232-115200.asm

بواسطة xavirompe

Resident (51)

صورة xavirompe

25-02-2021, 18:56

Hi, here is my quick and dirty code for the disk driver:

DSKIO:	
		JP	NC,DISKIOREAD

DISKIOWRITE:

	push hl
	ld c, "W"	;Send Read Command
	push BC		; B=number of sectors, C=read command
	push DE     ; DE = Sector number
	ld hl, 0 	; 
	add hl, sp 	; sp to hl
	ld bc, 4	; 4 bytes len
	call SENDBYTES
	pop DE
	pop BC
	pop hl		; Restore buffer address
	
	ld a,b		; Number of sectors to A
	add a,b 	; Shift 1 bit to the left
	ld b,a
	ld c,0		; low number of bytes, allways 0, 1 sector = 512 bytes
				; Send BC = number of bytes to send
				; HL = pointer of the send buffer
	call SENDBYTES
				; TODO: check returning error codes from the function

	ret
		
;----------------------------------------------

DISKIOREAD:
	push hl
	ld c, "R"	;Send Read Command
	push BC		; B=number of sectors, C=read command
	push DE     ; DE = Sector number
	ld hl, 0 	; 
	add hl, sp 	; sp to hl
	ld bc, 4	; 4 bytes len
	call SENDBYTES
	pop DE
	pop BC
	pop hl		; Restore buffer address
	
	ld a,b		; Number of sectors to A
	add a,b 	; Shift 1 bit to the left
	ld b,a
	ld c,0		; low number of bytes, allways 0, 1 sector = 512 bytes
				; Send BC = number of bytes to receive
				; HL = pointer of the receiving buffer
	call RECBYTES
				; TODO: check returning error codes from the function

	ret

بواسطة xavirompe

Resident (51)

صورة xavirompe

25-02-2021, 19:14

Here is the device:

بواسطة Pencioner

Scribe (1476)

صورة Pencioner

25-02-2021, 19:45

ocitygate wrote:

Where can I buy blank ROM cartridges?

You can use something like SGC (ask @Alexey if he has some boards left) or this one if you just need some cheaper cartridge with just a ROM inside. If you are in Japan you might try finding something like this one. You'll need an EPROM programmer though...

صفحة 2/11
1 | | 3 | 4 | 5 | 6 | 7