Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
#112416 - 01/31/18 05:43 PM A bug in i8275 emulation  
Joined: Mar 2015
Posts: 52
fulivi Offline
Member
fulivi  Offline
Member

Joined: Mar 2015
Posts: 52
The moment I saw the log message on commit f652d21e16 "i8275: handle invisible field attributes and "end of row - stop dma" special code better...." I knew it was going to break video emulation on hp64k..
And indeed, video stays black now.. no sign of life.
Should I report the bug somewhere else besides here, please?
Thanks.
--F.Ulivi

#112417 - 01/31/18 06:15 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: Apr 2006
Posts: 700
Tafoid Offline
Senior Member
Tafoid  Offline
Senior Member

Joined: Apr 2006
Posts: 700
USA
Originally Posted by fulivi
The moment I saw the log message on commit f652d21e16 "i8275: handle invisible field attributes and "end of row - stop dma" special code better...." I knew it was going to break video emulation on hp64k..
And indeed, video stays black now.. no sign of life.
Should I report the bug somewhere else besides here, please?
Thanks.
--F.Ulivi


I've posted an issue I found earlier in testing to the GitHub commit . It basically hard locks the emulation nearly 10 seconds in as I've noted.
https://github.com/mamedev/mame/commit/f652d21e167265bded620fab397f142d18bd7b45

There may be other sets with regressions - those are the only ones I was able to determine via snapshot/watchdog checking.




#112420 - 01/31/18 07:44 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
Oops. attotime::zero is not the same as attotime::never apparently smile Testing the fix.

#112421 - 01/31/18 08:09 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: Mar 2001
Posts: 15,954
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,954
USA
attotime::never is the opposite of attotime::zero, never = the largest possible attotime (which would be like years in the future, but the code generally all treats it specially so it never happens).

Set a timer to zero and it fires immediately. Set it to never and it never fires.

#112426 - 01/31/18 10:25 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
This diff fixes hp64k and breaks only one other driver (tim100). I've not tested rt1715 and sm1800, which are 'not working'.

Code
@@ -516,7 +517,7 @@ WRITE8_MEMBER( i8275_device::write )
                        LOG("I8275 IRQ 0\n");
                        m_write_irq(CLEAR_LINE);
                        m_write_drq(0);
-                       m_drq_on_timer->adjust(attotime::zero);
+                       m_drq_on_timer->adjust(attotime::never);
 
                        m_param_idx = REG_SCN1;
                        m_param_end = REG_SCN4;

#112428 - 02/01/18 03:04 AM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: Aug 2004
Posts: 1,353
Robbbert Offline
Very Senior Member
Robbbert  Offline
Very Senior Member

Joined: Aug 2004
Posts: 1,353
sm1800 currently shows a grey screen with a blinking black cursor in the home position.


tim100 is now causing MAME to freeze, which is unacceptable. Please fix that.

#112446 - 02/01/18 09:49 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
rt1715 and sm1800 (and ipds) don't actually hook up the 8275 to DMAC (no MCFG_I8275_DRQ_CALLBACK defined) so nothing should change for them either way.

tim100 is a puzzle so far.

#112616 - 02/14/18 06:31 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
https://github.com/mamedev/mame/commit/a2ad15beef865aa22f5b77e3d2e83f3b95b91f17 restores visuals in hp64k and doesn't break tim100 & others in the process (at least not in first 10 seconds of run time). I could not test trs80dt1, though.

#112829 - 03/10/18 03:04 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: Dec 2015
Posts: 81
AJR Offline
Member
AJR  Offline
Member

Joined: Dec 2015
Posts: 81
ms6102 now piles endless amounts of garbage text on the screen. I had hoped that that driver would at least be half-working, which it wasn't really even before the recent 8275 changes, since this Soviet terminal clones at least the VT100 keyboard interface circuit.

#112831 - 03/10/18 03:37 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
ms6102 is a mystery -- every other char in video memory is a field attribute code. Maybe the other 8275 is reading them while the first one is not looking...

#112832 - 03/10/18 06:18 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: Mar 2001
Posts: 15,954
R. Belmont Offline
R. Belmont  Offline

Very Senior Member

Joined: Mar 2001
Posts: 15,954
USA
In that case I'd guess the 8275 only sees every other byte - that's easy enough to pull off at a hardware level. Are there schematics?

#112834 - 03/10/18 06:41 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464

#112835 - 03/10/18 07:28 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: Jan 2012
Posts: 782
crazyc Offline
Senior Member
crazyc  Offline
Senior Member

Joined: Jan 2012
Posts: 782
That is weird, two 8275s but only one is connected to the chargen. The way it's wired up does suggest that the second handles char attributes. Strangely though, the data fed by the dmac is the same to both except the topmost bit of the second crtc. That's not quite right, although the second crtc doesn't connect the drq output and the data lines (other than bit 7) are the same, the WR line is different when dack is active.

Last edited by crazyc; 03/10/18 08:18 PM.
#112836 - 03/10/18 08:26 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
So the first one (DD55) is not getting data via DMA, only second one does? Fun smile

#112837 - 03/10/18 08:35 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: Jan 2012
Posts: 782
crazyc Offline
Senior Member
crazyc  Offline
Senior Member

Joined: Jan 2012
Posts: 782
Not sure but I suspect it is by feeding the second one first so the first one will hold drq high until both get a byte.

#112838 - 03/10/18 09:59 PM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
There's a bit of source code in the rom at the end (comments by me):
Code
CALL pEPEdA~A ; transmit
RET
KTO:
LXI H,bufp
SHLD Tp
KTO1:
CALL ANBUF
LDA FN
ANI 1
JNZ zb4
LDA zHp2
CPI 0


and it matches this

Code
2bbc: cd 78 19  call $1978
2bbf: c9        ret
2bc0: 21 28 df  lxi  h,$df28
2bc3: 22 25 df  shld $df25
2bc6: cd 89 2d  call $2d89
2bc9: 3a 05 de  ldax $de05
2bcc: e6 01     ani  $01
2bce: c2 72 26  jnz  $2672
2bd1: 3a 4c df  ldax $df4c
2bd4: fe 00     cpi  $00

#112843 - 03/11/18 10:46 AM Re: A bug in i8275 emulation [Re: fulivi]  
Joined: May 2012
Posts: 464
shattered Online content
Senior Member
shattered  Online Content
Senior Member

Joined: May 2012
Posts: 464
btw, EAROM hookup is currently wrong -- top 4 bits of data bus are wired to CS, /WR, /ERA and RD pins. 0x08D9 is EAROM restore routine and 0x1F8D is EAROM save.

EDIT: quick EAROM hack makes the terminal behave a little better -- it accepts serial port input, but still ignores keyboard and display is not stable:

[Linked Image]

Last edited by shattered; 03/11/18 02:18 PM.
Page 1 of 2 1 2

Who's Online Now
5 registered members (B2K24, seanriddle, Pernod, shattered, dxl), 34 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,543
Posts111,677
Members4,795
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.0
Page Time: 0.034s Queries: 14 (0.007s) Memory: 5.0819 MB (Peak: 5.3843 MB) Zlib enabled. Server Time: 2018-06-20 18:52:30 UTC