English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 20 July 2017, 15:59   #1
NLS
Ancient User
NLS's Avatar
 
Join Date: Apr 2007
Location: GREECE
Age: 47
Posts: 676
EMPLANT emulation?

(I don't visit the forum much, I think Jim Drew is here too - hello from Greece, remember Nick and Lucas, your original contacts in Greece?)

So... since WinUAE emulates also extra hardware, I wonder if EMPLANT could be implemented (maybe with the help of Jim?).

I searched the forum, but found no mention.
NLS is offline  
Old 20 July 2017, 17:35   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,737
EDIT: Wrong board.. But it still has too many chips that are not used in Amiga. Not going to happen without full specs.

EDIT2: Emplant SCSI emulation would be more interesting than the complete board, at least 5380 is fully emulated already
Toni Wilen is offline  
Old 20 July 2017, 17:43   #3
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
Not sure it would be too hard to emulate, at least from an "are chip docs available?" perspective. 5380 SCSI, three 6522 VIAs (ancestor of Amiga CIAs?) plus Zilog SCC which would be used for Mac-compatible serial/printer ports.

A-Max II+/IV has one 6522 and SCC, but no 5380. So perhaps both Emplant and A-Max board emulation could share some code.
mark_k is offline  
Old 20 July 2017, 19:10   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,737
Yes but debugging it would mean tracing some non-Amiga code which I don't want to do.
Toni Wilen is offline  
Old 21 July 2017, 16:02   #5
NLS
Ancient User
NLS's Avatar
 
Join Date: Apr 2007
Location: GREECE
Age: 47
Posts: 676
OK fair, Tony. It is your game, just threw the idea.

Jim doesn't follow things much any more?
(I would expect he has all the specs for hw/sw needed)
NLS is offline  
Old 21 July 2017, 16:27   #6
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
I can disassemble empscsi.device if needed. According to amiga.resource.cx NetBSD and OpenBSD support the Emplant SCSI too.

By the way, the empscsi.device code is very reminiscent of IVS_SCSI.device…

Last edited by mark_k; 21 July 2017 at 19:11.
mark_k is offline  
Old 31 July 2017, 21:38   #7
JimDrew
Registered User

 
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 692
The SCSI direct portion of the empscsi.device code was provided by William J. Coldwell who wrote several of the various SCSI drivers for various companies. I wrote the actual driver and functions except the SCSI direct code.

I have all of the source code still, written in Devpac.
JimDrew is offline  
Old 31 July 2017, 23:10   #8
gulliver
BoingBagged

gulliver's Avatar
 
Join Date: Aug 2007
Location: The South of nowhere
Age: 43
Posts: 2,256
Quote:
Originally Posted by JimDrew View Post
The SCSI direct portion of the empscsi.device code was provided by William J. Coldwell who wrote several of the various SCSI drivers for various companies.
Both the WarpEngine and the DraCo scsi firmware were also written by him.
gulliver is offline  
Old 01 August 2017, 00:15   #9
JimDrew
Registered User

 
Join Date: Dec 2013
Location: Lake Havasu City, AZ
Posts: 692
Yep, Bill did quite a SCSI drivers (written in C). Bill gave me SCSI direct code, and I used that in the empscsi.device, with the rest of the driver written by me in assembly.

The EMPLANT board uses a 53C80 (SCSI) and a 85C30 (SCC). The C version has a few specific features that the non-C versions don't have. I found this out when we purchased a few thousand 5380 chips and they didn't work for the the Mac emulation.
JimDrew is offline  
Old 01 August 2017, 21:41   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,737
Optional Autoboot ROM binary would be nice to have.

Driver sources are not really important, there are already more than enough 5380 based SCSI controllers emulated, I don't expect any surprises anymore.

(But if someone really wants whole board emulation, I require much more information from non-SCSI parts. Especially when it is about "non-Amiga" stuff..)
Toni Wilen is offline  
Old 02 August 2017, 19:07   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
My current emplant.device disassembly:
Code:
https://www.media!fire.com/file/91ccr3d33wm8vc4/empscsi_disasm_2017-08-02.tar.gz
Some notes:

5380 registers at board+$50x0.

$6000 is PIO data read/write? Driver uses MOVEP instructions, e.g. MOVEP.L D4,(0,A1) [where A1 points to board+$6000] Also tst.b sometimes, doesn't use result (to clear FIFO?).

Level 2 interrupt code does move.b #8,($3A00,A0)

empscsi.device looks for board manufacturer 2171, any product. However empscsi.amhd looks for 2171/21.

Init routine just after AddIntServer(), sets bits [7:5] at board+$3800 to 001. Then writes %10001000 to board+$3C00. Maybe interrupt enable and IRQ bits?
mark_k is offline  
Old 02 August 2017, 19:41   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,737
I found out that I have Emplant board (without SCSI and network hardware)

Autoconfig data is: 0xd1,0x20,0x40,0x00,0x08,0x7b,0x00,0x00,0x00,0x03,0xc0,0x00

Rev 1.5, exact same jumpers as in amiga.resource.cx image (and missing chips, scsi connector, resistor networks and crystal).
Toni Wilen is offline  
Old 02 August 2017, 22:11   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,737
SCSI emulation added. (But test was as simple as "hdtoolbox empscsi.device", -> drive was detected )
Toni Wilen is offline  
Old 03 August 2017, 15:03   #14
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
Does the Emplant change its product# depending on which options are installed? empscsi.amhd (version 1.0) looks like it will only work with product 21 (not 32).
mark_k is offline  
Old 03 August 2017, 18:21   #15
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
Been looking at emplant.library a little... Iit seems all(?) hardware registers are mirrored, so e.g. the byte at board+$5010 also appears at +$5011, +$5012, +$5013.
mark_k is offline  
Old 03 August 2017, 18:54   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,737
Quote:
Originally Posted by mark_k View Post
Does the Emplant change its product# depending on which options are installed? empscsi.amhd (version 1.0) looks like it will only work with product 21 (not 32).
Perhaps. ID changed.

Quote:
Originally Posted by mark_k View Post
Been looking at emplant.library a little... Iit seems all(?) hardware registers are mirrored, so e.g. the byte at board+$5010 also appears at +$5011, +$5012, +$5013.
I'd expect mirroring only in even bytes. It needs extra logic to mirror byte addresses in both halves when bus is 16-bit, it also matches use of MOVEP.
Toni Wilen is offline  
Old 03 August 2017, 20:25   #17
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
Could be, but see the code below. Also, for ease of address decoding it's probably the case that SCSI registers are mirrored so e.g. $5000 at $5002, $5004, .., and $500E.

"LibFunc30" returns base address of 5380 (i.e. board+$5000), or -1 if no 5380.
"LibFunc36" similar, returns SCSI data I/O address (i.e. board+$6000) or -1.
"LibFunc3C" returns board+$4000 or -1. (Maybe serial chip is there???)

Code:
LibFunc30	MOVE.L	D1,-(SP)
	TST.L	(_OurConfigDev).L
	BEQ.B	.ReturnMinus1

	MOVE.L	(_BoardAddr).L,D0
	ADDI.L	#$5000,D0
	MOVE.L	D0,D1
	MOVEA.L	D0,A0
	BCLR	#6,($10,A0)	;Clear TEST MODE bit in initiator command register
	BSR.W	lbC0004A4	;To read current SCSI Data Register???
	CMPI.L	#$FFFFFFFF,D0
	BEQ.B	lbC00034E

	MOVE.L	D1,D0
lbC00034E	MOVE.L	(SP)+,D1
	RTS


LibFunc36	MOVE.L	D1,-(SP)
	TST.L	(_OurConfigDev).L
	BEQ.B	.ReturnMinus1

	MOVE.L	(_BoardAddr).L,D0
	ADDI.L	#$6000,D0
	MOVE.L	D0,D1
	SUBI.L	#$1000,D0	;Point to board+$5000
	BSR.W	lbC0004A4
	CMPI.L	#$FFFFFFFF,D0
	BEQ.B	lbC00037E

	MOVE.L	D1,D0	;Return board+$6000
lbC00037E	MOVE.L	(SP)+,D1
	RTS


LibFunc3C	MOVE.L	D1,-(SP)
	TST.L	(_OurConfigDev).L
	BEQ.W	.ReturnMinus1

	MOVE.L	(_BoardAddr).L,D0
	ADDI.L	#$4000,D0
	MOVE.L	D0,D1
	BSR.W	lbC0004A4
	CMPI.L	#$FFFFFFFF,D0
	BEQ.B	lbC0003AA

	MOVE.L	D1,D0
lbC0003AA	MOVE.L	(SP)+,D1
	RTS


LibFunc42_GetBoardAddrPlus0x8000
	TST.L	(_OurConfigDev).L
	BEQ.W	.ReturnMinus1

	MOVE.L	(_BoardAddr).L,D0
	ADDI.L	#$8000,D0
	RTS

	...

lbC0004A4	MOVE.L	A0,-(SP)
	MOVEA.L	D0,A0
	MOVEQ	#0,D0
	MOVE.B	(3,A0),D0
	LSL.L	#8,D0
	MOVE.B	(2,A0),D0
	LSL.L	#8,D0
	MOVE.B	(1,A0),D0
	LSL.L	#8,D0
	MOVE.B	(A0),D0
	MOVEA.L	(SP)+,A0
	RTS
mark_k is offline  
Old 04 August 2017, 18:11   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,737
Where is the problem? Detection would work, even without mirroring because not installed return code is FFFFFFFF. At least one byte is non-FF if chip is installed.

Every Z2 board works more or less same, if io addresses are 8-bit wide, they are always either in odd or even bytes only. Unused byte usually contains FF or random bus noise. Other bytes are usually always mirrors if registers have larger than 2 byte gap.

I just checked what my Emplant board returns: odd bytes are always FF and some even bytes contain non-FF (for example +$2000 and +$3000). +$5000 and +$6000 is full FF only. (No SCSI chip installed)
Toni Wilen is offline  
Old 04 August 2017, 18:28   #19
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
There isn't necessarily a problem, just that the check code (lbC004A4) reads four successive bytes, not skipping alternate ones.

BTW, from what I assume is ROM-reading code, if you have Mac or other ROMs on the board, they can appear in the 16KB window at board+$8000 (appearing at all bytes there). ["Can" because which bank appears there can be set, and it's probably the case that ROM data doesn't always appear there, requiring some other register bits set appropriately first.]
mark_k is offline  
Old 06 August 2017, 17:04   #20
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,188
The Emplant SCSI emulation seems to work fine with A-Max (emplant.amhd). I didn't test it with AmigaDOS yet.

(By the way, er_SerialNumber probably has some significance. But not as an actual serial number, since it's 3 on your board.)

Last edited by mark_k; 06 August 2017 at 17:24.
mark_k is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Emplant Diagnostic Irl support.Hardware 14 27 June 2018 09:06
Getting Emplant to run ... SimonV support.Apps 17 27 December 2016 04:10
Emplant software Computolio request.Apps 16 30 April 2013 20:11
Emplant and CyberVision 64/3D Compatibility? alphonsus support.Hardware 0 25 January 2012 00:13
Wanted Emplant Board Zetr0 MarketPlace 2 18 August 2006 01:07

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.10537 seconds with 13 queries