22 August 2017, 19:08 | #1 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,343
|
Latest/final version of multi-os.device
I'm looking for whatever was the last/final version of multi-os.device. That came with Emplant and Fusion Mac emulators and can be used to access A-Max, Emplant and PC-format disks. I have versions 3.2 and 5.0 already.
|
23 August 2017, 04:37 | #2 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
According to my source code, the last version I released was v5.0.
|
23 August 2017, 15:44 | #3 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,343
|
Thanks. [I've been looking at multi-os.device and mfm.device to document the A-Max/Emplant disk format. I didn't check what A-Max itself does when writing yet.]
I wondered if there was a later version, because both new (undocumented?) library functions in v5.0 (compared to v3.2) are broken. In case you ever want to update it... Function -$4E does MOVE.L ($3F,A0),D2 to put a byte variable from the unit structure in D2. That will crash on 68000 due to misaligned read. Should be MOVEQ #0,D2 / MOVE.B ($3F,A0),D2 instead? Function -$54 seems to be the opposite of function -$4E, in that it sets rather than gets some variables from the unit struct. The instruction to set the byte at offset $3F is broken there: MOVE.L D2,($3F).W Misaligned write will crash on 68000, and it's actually writing to low memory not the unit struct. Should be MOVE.B D2,($3F,A0)? |
24 August 2017, 08:23 | #4 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
NONE of the EMPLANT and FUSION software is 68000 compatible. Every emulation (and just about every code I ever wrote) requires an 020 or later CPU. These two private functions are for getting and setting the media type:
Code:
;------------------------------------------------------------------------- ; (-78) -$4e EXTGETDISKFMT() ; ; This routines returns the current disk format and default format type. ; The default format type is what TD_FORMAT uses as the disk format to ; be formatting with. ; ; This routine also returns the media discriptor byte (used when ; formatting MS-DOS/Atari disks), the number of heads, number of ; tracks, and the number of sectors. ; ; ; D0 = Unit # ; A6 = ptr to device ; ; D0 > Current format type (see above) of disk ; -3 = Invalid unit # ; -4 = Unit not open yet ; -5 = Disk not in drive ; D1 > Default format type ; D2 > Media ID Byte:Heads:Tracks (per side):Sectors ExtGetDiskFmt cmpi.l #MD_NUMUNITS,d0 ;unit # > max unit #? bgt.s .0 ;yep, bad unit # lsl.l #2,d0 lea md_Units(a6,d0.l),a0 move.l (a0),d0 ;ptr to unit beq.s .1 move.l d0,a0 ;unit ptr in a0 tst.b mdu_DiskIn(a0) ;is disk in the drive? beq.s .2 ;nope! How can we get a format type!? moveq #0,d0 move.b mdu_DiskFmt(a0),d0 ;ok, return current disk format move.b mdu_Flags(a0),d1 ;return default format type move.l mdu_MediaByte(a0),d2 ;output media byte:heads:tracks:sectors rts .0 moveq #BAD_UNIT_NUM,d0 ;invalid unit # rts .1 moveq #UNIT_NOT_OPEN,d0 ;unit not open yet rts .2 moveq #DISK_NOT_IN,d0 ;no disk in drive rts ;------------------------------------------------------------------------- ; (-84) -$54 EXTSETDISKFMT() ; ; This routine sets the current disk format and default format types. ; The default format type is what TD_FORMAT uses as the disk format to ; be formatting with. ; ; This routine also uses D2 for the media discriptor byte (used when ; formatting MS-DOS/Atari disks), the number of heads, number of ; tracks, and the number of sectors. ; ; D0 = Unit # ; A6 = ptr to device ; D1 = FormatType (above) ; D2 = Media Byte:Heads:Tracks:Sectors (byte each) ; ; D0 > 0 = ok ; -3 = Invalid unit # ; -4 = Unit not open yet ExtSetDiskFmt cmpi.l #MD_NUMUNITS,d0 ;unit # > max unit #? bgt.s .0 ;yep, bad unit # lsl.l #2,d0 ;*4 lea md_Units(a6,d0.l),a0 ;get unit struct address move.l (a0),d0 beq.s .1 ;unit open? move.l d0,a0 moveq #0,d0 move.b d1,d0 move.b d0,mdu_DiskFmt(a0) ;set format type for disk move.b d0,mdu_Flags(a0) ;set Flags (default format type) move.l d2,mdu_MediaByte ;set media byte:heads:tracks:sectors moveq #0,d0 rts .0 moveq #BAD_UNIT_NUM,d0 ;Invalid unit # rts .1 moveq #UNIT_NOT_OPEN,d0 ;Unit not open yet! rts Code:
move.l d2,mdu_MediaByte(a0) ;set media byte:heads:tracks:sectors Code:
move.l d2,mdu_MediaByte ;set media byte:heads:tracks:sectors Last edited by JimDrew; 24 August 2017 at 08:41. |
24 August 2017, 18:36 | #5 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,343
|
I still think there's a bug. That misaligned move.l is the only instruction which would crash on 68000, and you don't check the CPU type on device open.
Also, the four bytes at offset $3F in the unit structure are never (as far as I can tell) used at all. The only time they are accessed is by those two library functions. Unless the user has called ExtSetDiskFmt they should always contain 0 (since unit struct was allocated with MEMF_CLEAR). Could you elaborate on what the media byte is for? |
25 August 2017, 20:23 | #6 |
Registered User
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 741
|
Because multi-os.device can only be opened by my applications, which all check to make sure there is an 020+ being used, there is no bug. I use quite a few structures that are misaligned because the Mac does, and many of these structures are just copied to/from Mac memory.
The media byte is a private field used by my emulations. The "mdu" structure is filled in and used by the emulations. Last edited by JimDrew; 25 August 2017 at 20:29. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Latest version of Dopus? | eebuckeye | support.Apps | 4 | 01 June 2014 20:14 |
Looking for TLSFMem latest version | amigasith | request.Apps | 9 | 26 February 2014 23:09 |
Latest version? | emuola | project.KGLoad | 13 | 30 May 2010 11:12 |
EAB Multi Platform League - Special Round 2 - Final Fight 2 & 3 (SNES) | TCD | EAB's competition | 82 | 06 December 2009 11:32 |
Latest version of 68030? | Calgor | support.Hardware | 9 | 16 January 2009 17:49 |
|
|