Previous Thread
Next Thread
Print Thread
Page 7 of 14 1 2 5 6 7 8 9 13 14
Ensjo #53029 08/24/09 12:39 PM
Joined: May 2004
Posts: 961
Likes: 23
D
Senior Member
Offline
Senior Member
D
Joined: May 2004
Posts: 961
Likes: 23
Originally Posted By Ensjo
I don't have a C compiler/SDK either... frown Any suggestions?

http://mess.redump.net/compiling_mess

Curt Coder #53034 08/24/09 01:55 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Curt Coder
Added the MC6847 fixes (shift and charROM) to svn. Does it look right now?

Yes, Curt, the ROM chars do look right.

The change of the shift from ">> 5" to ">> 6" was right, but it comes out that more of MC6847's code still needs to be changed to behave properly. frown The most significative bit of the VRAM byte is lost somewhere, so only two colors are displayed twice, instead of four colors. Gotta check better to find what to change (without breaking what's working, glup).

Ensjo #53048 08/24/09 09:17 PM
Joined: May 1999
Posts: 157
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 157
Originally Posted By Ensjo

Ah, I forgot to say... It's just the sample adventure given in the old Input Magazine.


OMG! The Input Magazine!!! I still have the Italian edition at my parents' home... and this one too!


JoJo
Ensjo #53081 08/25/09 06:18 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Ensjo
The change of the shift from ">> 5" to ">> 6" was right, but it comes out that more of MC6847's code still needs to be changed to behave properly. frown The most significative bit of the VRAM byte is lost somewhere, so only two colors are displayed twice, instead of four colors. Gotta check better to find what to change (without breaking what's working, glup).


The Semigraphics 6 mode uses all of the bits of the byte read from the VRAM. Bits 7~6 code the foreground color; bits 5~0 code the block pattern. After trying to understand how m6847.c works, I guess that these changes would make Semigraphis 6 work correctly:
Code:
  150     /* 2^7 modes, 256/16 character groups, background/foreground */
  151     UINT8 colordata[128][256/16][2];
  152 
  153     /* 2^7 modes, 256 characters, 12 scanlines */
  154     UINT8 fontdata[128][256][12];

Code:
 1200         bg_color = color(m6847->colordata[attr_index][byte / 16][0]);
 1201         fg_color = color(m6847->colordata[attr_index][byte / 16][1]);

Code:
 1210             char_data = m6847->fontdata[attr_index][byte][scanline % 12];

Code:
 1798         for (byte = 0; byte < 256; byte++)

Try these, then type and run this BASIC program to see if there are four colors:
Code:
10 GR : OUT 128, 96
20 FOR A = 0 TO 255
30 POKE 32768 + A, A
40 NEXT
50 CALL 49158 : REM PRESS ANY KEY TO EXIT
60 TEXT

Ensjo #53094 08/26/09 08:41 AM
Joined: Feb 2005
Posts: 449
C
Senior Member
Offline
Senior Member
C
Joined: Feb 2005
Posts: 449
Yes, there is now in svn r5501:

green
yellow
blue
red

stripes on the screen with your changes.

I hope this doesn't break other drivers.

Curt Coder #53110 08/26/09 08:08 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Curt Coder
Yes, there is now in svn r5501: green, yellow, blue, red stripes on the screen with your changes.

I hope this doesn't break other drivers.
Me too. smile

Only one thing, though: You forgot to change 128 into 256 in one comment line:
Code:
  153     /* 2^7 modes, 128 characters, 12 scanlines */
  154     UINT8 fontdata[128][256][12];
When the changes appear on the next BobZ Automatic Daily Build I'll check them out.
_________________________________________________

Given that, let's check what's left at the TODO for MC-1000:
Code:
   16     - cassette
   17     - interrupt from NE555
   18     - xtal frequency?
   19     - Z80 wait at 0x0000-0x1fff when !hsync & !vsync
   20     - MC6847 color artifacting is broken
   21     - 80-column card (MC6845)
   22     - Charlemagne / GEM-1000 / Junior Computer
  • Cassette seems to be working right already.
  • MC6847 does implement (NTSC) artifacts. Why you say it is broken? Because it doesn't implement PAL-M artifacts?
  • Implementing Charlemagne/GEM-1000 smile depends on someone finding info on that obscure machine other than what's found in Old-Computers.com.
  • As for MC6845 (80-column card)... In this case we would have the machine generating two screens simultaneously. How is this to be handled in M.E.S.S.?
  • I'd need a longer description of the other TODOs.

Ensjo #53112 08/26/09 08:56 PM
Joined: May 1999
Posts: 157
Senior Member
Offline
Senior Member
Joined: May 1999
Posts: 157
Originally Posted By Ensjo
  • MC6847 does implement (NTSC) artifacts. Why you say it is broken? Because it doesn't implement PAL-M artifacts?


One of the (very) long-term goals of MAME/MESS is to implement artifacting at core level rather than at device level.

I wonder if, given the specs of the three major standards (NTSC, PAL and SECAM) and the ITU id table, is possible to model (in a mathematical sense) all the possible artifact schemes.

Of course, there will still be a little number of parameters that have to be tweaked by the user (gamma, tint, etc.) but it'd be funny to "connect" e.g. an Oric Atmos to a SECAM-M monitor and see what happens wink

Originally Posted By Ensjo
  • As for MC6845 (80-column card)... In this case we would have the machine generating two screens simultaneously. How is this to be handled in M.E.S.S.?


That's definitely easier to achieve: see the SVI-318 driver. Basically you plot the 32-columns display on screen #1, and the 80-columns display on screen #2: with the proper layout file you can display one of the two screens, or both, at your pleasure!


JoJo
Ensjo #53126 08/27/09 12:25 PM
Joined: Feb 2005
Posts: 449
C
Senior Member
Offline
Senior Member
C
Joined: Feb 2005
Posts: 449
Originally Posted By Ensjo

[*]Cassette seems to be working right already.
[*]MC6847 does implement (NTSC) artifacts. Why you say it is broken? Because it doesn't implement PAL-M artifacts?
[*]Implementing Charlemagne/GEM-1000 smile depends on someone finding info on that obscure machine other than what's found in Old-Computers.com.
[*]As for MC6845 (80-column card)... In this case we would have the machine generating two screens simultaneously. How is this to be handled in M.E.S.S.?
[*]I'd need a longer description of the other TODOs.
[/list]


Cassette/MC6847 comments were obsolete, I removed them.

Implementing the 80-column screen is trivial once we get a dump of the MC6845 character generator ROM. Or does it use video RAM instead?

Curt Coder #53203 08/31/09 07:18 PM
Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
Originally Posted By Curt Coder
Implementing the 80-column screen is trivial once we get a dump of the MC6845 character generator ROM. Or does it use video RAM instead?

Uh, I have no info on how MC-1000's 80-column capability was implemented. frown

Joined: Jul 2009
Posts: 78
Ensjo Offline OP
Member
OP Offline
Member
Joined: Jul 2009
Posts: 78
In order to check if the M.E.S.S. implementation of MC6847 was correct, I wrote a program in my MC-1000 (.wav file) that draws the characters in Resolution Graphics 6 (two-color 256x192) mode (with data from one of the "fontdata" arrays found in file m6847.c) and other bytes so that, alternating between text mode and RG6 mode, the real characters and the characters drawn alternate in the same screen positions, so I could compare and easily perceive any misplaced or lacking pixels.

Code:
10  HGR 
20  OUT 128,158
30  FOR A = 0 TO 511
40  POKE 32768 + A,32
50  NEXT 
60  FOR A = 64 TO 127
70  POKE 32768 + A,A
80  FOR B = 3 TO 9
90  READ C
100  IF C THEN  POKE 32768 + (A AND 224) * 12 + B * 32 + (A AND 31),C
110  NEXT B,A
120  OUT 128,1: FOR A = 1 TO 200: NEXT 
130  OUT 128,159: FOR A = 1 TO 200: NEXT 
140  GOTO 120
10000  REM DADOS DOS CARACTERES
10010  DATA 28,34,2,26,42,42,28
10020  DATA 8,20,34,34,62,34,34
10030  DATA 60,18,18,28,18,18,60
10040  DATA 28,34,32,32,32,34,28
10050  DATA 60,18,18,18,18,18,60
10060  DATA 62,32,32,60,32,32,62
10070  DATA 62,32,32,60,32,32,32
10080  DATA 30,32,32,38,34,34,30
10090  DATA 34,34,34,62,34,34,34
10100  DATA 28,8,8,8,8,8,28
10110  DATA 2,2,2,2,34,34,28
10120  DATA 34,36,40,48,40,36,34
10130  DATA 32,32,32,32,32,32,62
10140  DATA 34,54,42,42,34,34,34
10150  DATA 34,50,42,38,34,34,34
10160  DATA 62,34,34,34,34,34,62
10170  DATA 60,34,34,60,32,32,32
10180  DATA 28,34,34,34,42,36,26
10190  DATA 60,34,34,60,40,36,34
10200  DATA 28,34,16,8,4,34,28
10210  DATA 62,8,8,8,8,8,8
10220  DATA 34,34,34,34,34,34,28
10230  DATA 34,34,34,20,20,8,8
10240  DATA 34,34,34,42,42,54,34
10250  DATA 34,34,20,8,20,34,34
10260  DATA 34,34,20,8,8,8,8
10270  DATA 62,2,4,8,16,32,62
10280  DATA 56,32,32,32,32,32,56
10290  DATA 32,32,16,8,4,2,2
10300  DATA 14,2,2,2,2,2,14
10310  DATA 8,28,42,8,8,8,8
10320  DATA 0,8,16,62,16,8,0
10330  DATA 0,0,0,0,0,0,0
10340  DATA 8,8,8,8,8,0,8
10350  DATA 20,20,20,0,0,0,0
10360  DATA 20,20,54,0,54,20,20
10370  DATA 8,30,32,28,2,60,8
10380  DATA 50,50,4,8,16,38,38
10390  DATA 16,40,40,16,42,36,26
10400  DATA 24,24,24,0,0,0,0
10410  DATA 8,16,32,32,32,16,8
10420  DATA 8,4,2,2,2,4,8
10430  DATA 0,8,28,62,28,8,0
10440  DATA 0,8,8,62,8,8,0
10450  DATA 0,0,0,48,48,16,32
10460  DATA 0,0,0,62,0,0,0
10470  DATA 0,0,0,0,0,48,48
10480  DATA 2,2,4,8,16,32,32
10490  DATA 24,36,36,36,36,36,24
10500  DATA 8,24,8,8,8,8,28
10510  DATA 28,34,2,28,32,32,62
10520  DATA 28,34,2,12,2,34,28
10530  DATA 4,12,20,62,4,4,4
10540  DATA 62,32,60,2,2,34,28
10550  DATA 28,32,32,60,34,34,28
10560  DATA 62,2,4,8,16,32,32
10570  DATA 28,34,34,28,34,34,28
10580  DATA 28,34,34,30,2,2,28
10590  DATA 0,24,24,0,24,24,0
10600  DATA 24,24,0,24,24,8,16
10610  DATA 4,8,16,32,16,8,4
10620  DATA 0,0,62,0,62,0,0
10630  DATA 16,8,4,2,4,8,16
10640  DATA 24,36,4,8,8,0,8

Here I used black-and-white RG6. To avoid the resulting artifacting, I changed to black-and-green RG6:

Code:
130  OUT 128,157: FOR A = 1 TO 200: NEXT 

Then I realized that NO CHANGE IN BACKGROUND COLOR is perceived. shocked

Here's a video with the result:
http://www.ensjo.net/mc-1000/MVI_1262.AVI

I have realized long before that black-and-green RG6's "black" background was somewhat greenish, but it never occurred to me that it was SO SIMILAR to text mode's dark green background. (Seemingly RG6's bright border gives us the impression that they are different.)

Note that when we alternate between black-and-white and black-and-green RG6, we do perceive a change in background color:
http://www.ensjo.net/mc-1000/MVI_1261.AVI

This having been said... QUESTIONS: Is this phenomenon observed in other machines based on MC6847? (A real TRS-80 Color Computer, for instance. Can anyone check it?) Is DARK GREEN the real background color of MC6847's black-and-green RG6 mode?

Last edited by Ensjo; 09/02/09 06:22 PM.
Page 7 of 14 1 2 5 6 7 8 9 13 14

Link Copied to Clipboard
Who's Online Now
2 members (2 invisible), 12 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,085
Posts119,080
Members5,014
Most Online890
Jan 17th, 2020
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