Previous Thread
Next Thread
Print Thread
Page 2 of 2 1 2
Joined: Apr 2012
Posts: 340
Likes: 60
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 340
Likes: 60
Finally implemented character rounding:
Old
[Linked Image from i.imgur.com]
New
[Linked Image from i.imgur.com]
This also includes a few fixes to the roms, note corrected 'D'.

I'm using a teletext engineering test image for testing and are still some obscure control characters not being handled correctly. Hope to get it submitted for this months release though.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Joined: May 2015
Posts: 44
Member
Offline
Member
Joined: May 2015
Posts: 44
Nice! I hope it gets submitted for 0.167.


"Three days? That's tomorrow, we better get going!"
Joined: Apr 2012
Posts: 340
Likes: 60
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 340
Likes: 60
Completed my saa5050 updates, here's some screenshots to compare old/new with the real thing.
old
[Linked Image from i.imgur.com]
new
[Linked Image from i.imgur.com]
real
[Linked Image from i.imgur.com]
All control codes are now handled correctly.
It is still not perfect though, if you look closely you'll notice the bottom scanline is missing from each character row, most noticeable on y and g. This is not a regression as the old screenshot shows this too. I'll get back to it when I understand more of video handling.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Joined: Apr 2012
Posts: 340
Likes: 60
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 340
Likes: 60
So, I broke malzak and p2000t with this update. I did test them before submitting but obviously not with what actually got submitted.

This has been quite puzzling but I think I now have a conclusion smile

The saa5050 outputs characters of 20 scanlines but the mc6845 has R9 set to 18 and so outputs 19 scanlines (I had fudged saa5050 to accommodate this and so broke malzak etc). This explains why I'm missing the bottom scanline in the above screenshots.

I've now been reliably informed the bbc actually uses the hd6845 http://www.cpcwiki.eu/imgs/c/c0/Hd6845.hitachi.pdf and on page 90:
Quote
Maximum Raster Address Register (R9) *
This is a register used to program maximum raster address within 5-bit. This register defines total number of rasters per character including line space. This register is programmed as follows.

Non-interlace Mode, Interlace Sync Mode
When total number of rasters is RN, RN-1 shall be programmed.

Interlace Sync & Video Mode
When total number of rasters is RN, RN-2 shall be programmed.
So in interlace mode it would output 20 scanlines when R9 is 18.

I see our implementation of hd6845 doesn't implement this so will try to fix this.

I also noticed we have a MCFG_MC6845_INTERLACE_ADJUST only used in apricot. Is this a workaround for my issue and the apricot should actually use a fixed hd6845?


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Joined: May 2004
Posts: 994
Likes: 93
D
Senior Member
Offline
Senior Member
D
Joined: May 2004
Posts: 994
Likes: 93
Probably related yes. Without the hack the apricot displays 350 instead of 400 lines.

Joined: Aug 2007
Posts: 62
O
Member
Offline
Member
O
Joined: Aug 2007
Posts: 62
I know this is old, was digging into SAA5050 behaviour in the P2000 computer.
When I run the test image into the real computer with real SAA5050, all colour control codes are displayed as white box, as they are high value (129-135), same for the boxes between the divide symbol, those are black on white background. To get the image as seen here, you have to use the low ones (1-7), and replace the box value (255) with the non inverted box (127). Also in your rendition "Conceil Flash * Box Steady Gone ?" is visible, on a real SAA5050 only "* Box" is visible and blinks, and "Steady" is continuously visible.
Another minor difference is the 2 lines of 4 "separated" magenta pixels left of Test Page are in reality 2 lines of 6 pixels in magenta.
Back to the rounding. On a CRT the rounding is hardly visible. The image is closer to the original non-rounded one. I have the feeling the odd and even scanlines are roughly at the same spot, and thus more blurring together than above eachother. So the interpolation gives some fuzz to the end of the scanline. A character is clearly visible as 9 scanlines in reality.

Joined: Apr 2012
Posts: 340
Likes: 60
Pernod Offline OP
Senior Member
OP Offline
Senior Member
Joined: Apr 2012
Posts: 340
Likes: 60
Originally Posted by Ome Joop
I know this is old, was digging into SAA5050 behaviour in the P2000 computer.
When I run the test image into the real computer with real SAA5050, all colour control codes are displayed as white box, as they are high value (129-135), same for the boxes between the divide symbol, those are black on white background. To get the image as seen here, you have to use the low ones (1-7), and replace the box value (255) with the non inverted box (127). Also in your rendition "Conceil Flash * Box Steady Gone ?" is visible, on a real SAA5050 only "* Box" is visible and blinks, and "Steady" is continuously visible.
Another minor difference is the 2 lines of 4 "separated" magenta pixels left of Test Page are in reality 2 lines of 6 pixels in magenta.
Back to the rounding. On a CRT the rounding is hardly visible. The image is closer to the original non-rounded one. I have the feeling the odd and even scanlines are roughly at the same spot, and thus more blurring together than above eachother. So the interpolation gives some fuzz to the end of the scanline. A character is clearly visible as 9 scanlines in reality.
Even though those screenshots are a good few years old now I don't think much (if anything) has changed since then. The current behaviour on a BBC Micro is correct, for normal use case.

I've never seen an actual P2000T video output for comparison, online videos seem to be all emulated. The current SAA5050 behaviour assumes an interlaced display and applies character rounding, maybe the P2000T is not interlaced? Can you supply some photographic evidence to work with?

Adapting the SAA5050 to work with both interlaced and non-interlaced (non rounding) displays is on my TODO list, but is kinda dependant on MC6845 improvements for what I want to achieve.


BBC Model B, ATPL Sidewise, Acorn Speech, 2xWatford Floppy Drives, AMX Mouse, Viglen case, etc.
Joined: Jun 2009
Posts: 32
Likes: 2
S
Member
Offline
Member
S
Joined: Jun 2009
Posts: 32
Likes: 2
Did you see this pull request? https://github.com/mamedev/mame/pull/7577

Page 2 of 2 1 2

Link Copied to Clipboard
Who's Online Now
3 members (robcfg, ICEknight, Dorando), 59 guests, and 1 robot.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,308
Posts121,693
Members5,070
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