Previous Thread
Next Thread
Print Thread
Page 28 of 56 1 2 26 27 28 29 30 55 56
rfka01 #105293 04/26/16 05:05 PM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
Well, DEC manuals state the FDC code has a 'sweet spot' (whatever that tells us). I may have to look that paragraph up.

(i dont want to argue...)

Found a description of the wait state logic, as described by DEC:
[Linked Image from dl.dropboxusercontent.com]
(Technical manual, PDF page 115)

WAIT logic (DUELL schmatics, saved from Shoutbox):
[Linked Image from dl.dropboxusercontent.com]

Sorry for the bad quality.

Last edited by Bavarese; 04/26/16 05:21 PM.
rfka01 #105294 04/26/16 07:33 PM
Joined: Aug 2015
Posts: 406
Senior Member
Offline
Senior Member
Joined: Aug 2015
Posts: 406
I believe that MAME currently doesn't do dynamic wait states, so if the software depends on it, it propably needs to be faked somehow by the driver.

I have a similar problem with the lack of DTACK for the 68K which can stretch the access time when accessing slow devices. I'd really like to see a propert DTACK working but I am not even close to that level of understanding yet.


Because I can
rfka01 #105295 04/26/16 08:00 PM
Joined: Mar 2001
Posts: 17,234
Likes: 260
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 17,234
Likes: 260
68k Macs have some magic where you can do a DWORD read of the 5380 SCSI controller and it'll freeze the processor via DTACK until 4 bytes come in over the SCSI bus. That's the situation where no DTACK is fatal. If it's just causing a wait state, you can m_maincpu->adjust_icount(cycles) to add more cycles to the access. (the # of cycles must be *negative* to have a wait state, a positive number makes the CPU effectively speed up on access instead ;-)

rfka01 #105296 04/26/16 08:46 PM
Joined: Aug 2015
Posts: 406
Senior Member
Offline
Senior Member
Joined: Aug 2015
Posts: 406
Ahh, interesting, that might help to implement VME bus accesses too, I'll have a look at it.


Because I can
rfka01 #105754 05/26/16 08:04 PM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
Command $1C (SEEK_WITH_VERIFY) does not work as intended.

The diagnostic routines (RX50 DIAG.DISK) appear to use it extensively for READ and WRITE tests. Where is the bug? smirk

https://dl.dropboxusercontent.com/u/37819653/BANNISTER/SEEK_WITH_VERIFY_FAILS_1.jpg

https://dl.dropboxusercontent.com/u/37819653/BANNISTER/SEEK_WITH_VERIFY_FAILS_2.jpg

Hint: there is a disassembly of the main BIOS routines for the Z80 at

https://github.com/shattered/retro-bios/tree/master/dec-rainbow100b

Search for WRITE and 1Ch.

Last edited by Bavarese; 05/26/16 08:09 PM.
rfka01 #105773 05/28/16 10:09 AM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
A SEEK_WITH_VERIFY (command $1c) ends with FORCE_INTERRUPT (c=d0) instead of SCAN_ID. I cant figure out why.

Output from log file ("IRQ REQUEST OBTAINED" stems from my own driver)
..
[:fd1793x] SEEK_WAIT_STEP_TIME_DONE
[:fd1793x] SEEK_MOVE
[:fd1793x] SEEK_WAIT_STEP_TIME_DONE
[:fd1793x] SEEK_WAIT_STABILIZATION_TIME_DONE
[:fd1793x] SEEK_DONE
[:fd1793x] SEARCH_ADDRESS_MARK_HEADER in case SEEK_DONE
[:fd1793x] Initiating command d0 <------------- ???
[:fd1793x] Forced interrupt (c=d0) <------------- ???
...

_SHOULD_ LOOK LIKE THIS:

[:fd1793x] SEEK_MOVE
[:fd1793x] SEEK_WAIT_STEP_TIME_DONE
[:fd1793x] SEEK_WAIT_STABILIZATION_TIME_DONE
[:fd1793x] SEEK_DONE
[:fd1793x] SEARCH_ADDRESS_MARK_HEADER in case SEEK_DONE
[:fd1793x] SCAN_ID <<<< ----------------
[:] FLOPPY - IRQ REQUEST OBTAINED: TRUE <<<< ------------ OK
[:] FLOPPY - IRQ REQUEST OBTAINED: false

Last edited by Bavarese; 05/28/16 10:09 AM.
rfka01 #105783 05/29/16 06:02 PM
Joined: Jan 2012
Posts: 891
Likes: 17
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 891
Likes: 17
I can't get it to boot at all. Is there some procedure to make it work?

rfka01 #105786 05/30/16 08:51 AM
Joined: Apr 2012
Posts: 193
B
Senior Member
Offline
Senior Member
B
Joined: Apr 2012
Posts: 193
Thanks for jumping in. Just activate the keyboard workaround, as follows:

Code
#define FORCE_RAINBOW_B_LOGO
#define KEYBOARD_WORKAROUND
#define KBD_DELAY 8    // (debounce delay, increase if necessary)
Necessary header files (important):
https://dl.dropboxusercontent.com/u...W-100_KEYBOARD_WORKAROUND_2016_05_30.zip

Without it, emulation stops with fatal ERROR 13 (keyboard stuck). R.Belmont already has spent considerable time on this one, and might know more.

Note that the workaround patches the BIOS heavily. It is the only way to get the machine going (for now).

- because the workaround disables standard BIOS procedures, you will also need a proper NVRAM file for 832 K:

https://dl.dropboxusercontent.com/u/37819653/BANNISTER/nvram_832.zip

Please set max. RAM accordingly in DIP settings (RAM = 832K; important).

- The RX50DIAG image is very valueable when testing. Especially READ and WRITE tests (available under INDIVIDUAL TESTS, with key 3, then 4 for FLOPPY TESTS) and also SYSTEM INTERACTION - because it hangs emulation.

https://dl.dropboxusercontent.com/u/37819653/BANNISTER/rx50diag.td0

- Force interrupt ($D0 or $D4) kicks in sooner or later, and SEEK_WITH_VERIFY or SCAN_ID fails (see RX50DIAG, again).

I suspect the Z80 runs too fast now (as I-O and MEMORY WAIT states aren't properly implemented; compare diagrams above).

There is an option to STALL_ON_WAIT for the Z80 and i experimented with it, without success...

- Work in progress (no guarantees) -

https://dl.dropboxusercontent.com/u/37819653/BANNISTER/rainbow.cpp

Of course, it could also be a silly bug i overlooked for years (e.g. interrupt handling and arbitration in update_8088_irqs @ rainbow.cpp changed at some point, and it is unclear if it is presently correct).


- To help with emulation, i have disassembled most parts of the Rainbow BIOS and put it on Github, available under

https://github.com/shattered/retro-bios/tree/master/dec-rainbow100b

Ask me anytime if you need more details smile

P.S.: help with untangling the monolithic driver would be very welcome

Last edited by Bavarese; 05/30/16 09:49 AM.
rfka01 #105886 06/02/16 01:48 PM
Joined: Jan 2012
Posts: 891
Likes: 17
C
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 891
Likes: 17
I believe there should be an interrupt right here as enabling the transmitter should cause txrdy to go high. That interrupt ought to cause the reset command to be sent to the keyboard.

Edit: CTS is tied to ground on the schematic so it set to 0. That what is blocking the irq.

Last edited by crazyc; 06/02/16 02:00 PM.
rfka01 #105888 06/02/16 03:53 PM
Joined: Mar 2006
Posts: 1,079
Likes: 6
L
Very Senior Member
Offline
Very Senior Member
L
Joined: Mar 2006
Posts: 1,079
Likes: 6
Is the CTS pin on the uart supposed to be the direct CTS pin state (translated from rs232 voltage as described below in a direct fashion through a voltage divider) or the inverted state (through a discrete voltage divder+inverter or an inverting receiver)? This makes a big difference. The datasheet should say.

RS232 Voltage:
-3 to -25VDC is MARK (OFF for control lines like CTS, for serial tx/rx this is the '1' state)
3 to 25VDC is SPACE (ON for control lines like CTS, for serial tx/rx this is the '0' state, and if held this way for more than 8/9 bit cycles counts as a serial BREAK))

MC1489 is an example of a quad rs232 receiver.

LN

Last edited by Lord Nightmare; 06/02/16 05:05 PM. Reason: clarified

"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
Page 28 of 56 1 2 26 27 28 29 30 55 56

Link Copied to Clipboard
Who's Online Now
3 members (AJR, Praxis, 1 invisible), 190 guests, and 0 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,328
Posts122,128
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com