At 09:30 AM 03/08/99 +0100, you wrote:

>> You only have to implement the I/O routines located at #4010 and higher
>> (get DPB, read sector, disk change, format etc). You don't even need the
>> other routines, because they are already located in the main diskROM.
> 
>       But if you do this, I guess it is not possible anymore to use the
>normal diskdrive, or...

No.
The way I do it, it's partially true. After I activate the JoyNet drive, I
will have 1 normal diskdrive instead of 2.
But if you do it the right way (insert at boot time), you will simply have
more drives. For example ESE-SCC RAMdisk adds itself as drive A:, where B:
and C: are the normal drives.

>I was also thinking of a way to use the
>joystick-interface, but then use 4-bit parallel or 8-bit parallel in one
>direction and 1 or 2 bit in the other direction (because I guess reading
>will occur more often than writing).

Joystick interface is not such a good choice, in my opinion.
There are several problems:
- only 3 bits to write and 6 bits to read, where 2 of those (triggers) are
either read or write but not both
- switching from read to write requires selecting a different PSG register
(code execution time overhead)
- the BIOS messes around with the values of the joystick port (see recent
thread in this mailinglist). One problem that wasn't mentioned yet is that
when an MSX is switched on, the values on the joystick port change. This
can cause problems if the other side (server on PC) is already running.
- you already need joystick ports to connect a joystick or a JoyNet cable

My suggestion is that you build the connection hardware in a cartridge.
Since you wanted to use a ROM, you'll have to make one anyway.

To access it, you could define 4 ports:
- input port: 8 bits data
- output port: 8 bits data
- status port: tells you when new data has arrived and when you can send
- control port: turn on/off certain features (if necessary)
You could map them either to I/O ports or to memory addresses. You can use
the same addresses for the input port and the output port, if that
simplifies the design. The same for the control and status port.

To get optimal transfer speed, it would need a small buffer. Maybe a single
byte is already enough.

The protocol I used for the JoyNet drive is very simple. When the MSX needs
something done, it sends a 4-byte request. Examples are:
        db      GET_SECTOR
        dw      first_sector
        db      nr_sectors
and
        db      GET_DISKCHANGE
        db      0,0,0                   ;undef

The length of the reply depends on the command. For a sector read, it is a
status byte, possibly followed by 512 bytes of data. The status byte is 0
if the read succeeded or a non-zero error number if it failed.

Maybe you'll want a bit that signals "end of transmission". It would be
nice to have, but not necessary: you can design a protocol that always
knows how long the message is that it's going to receive.

Bye,
                Maarten



****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to