Jump to content

Recommended Posts

Posted (edited)

Bored waiting for the latest iteration of 'my' 80 column / serial / expansion card to turn up... boy, have I made a meal of that one! I do hope I get it to work eventually.

 

...so in a fit of stupidity I bought a V9958 off fleaBay, and then realised I'd have to do something with it. So here's another bone for me to gnaw on:

 

Assuming I get round to making a working version (you never know, miracles may happen) it's an old school GFX upgrade:

-V9958 and, potentially, all the benefits that come with that

-RGB out, sorry 15KHz only

-196k split between 128k VRAM and 64k XRAM

-More sprites supported per scan line

 

I've not tried to route it as yet; partially as I need some time to look for all the mistakes I've certainly made, and partially because it will be a SOB to route. On that latter subject I guess I need to add a pass-though for SGM users which will add to the 'fun'.

Maybe, apart from better video, such an upgrade could open the door to MSX2 software and a 'native' 80 column mode.

 

So... something worth pursuing? Thoughts..?

 

 

GFX_9958_brd.png

GFX_9958_sch.png

Edited by CharlesMouse
  • Like 4

Share this post


Link to post
Share on other sites
Posted (edited)

Well, I had a bit more of a fiddle and things seem to have come along rather more nicely that I expected.

 

Having taken a look at the Colecovision schematic, rather than the ADAM one, the memory addressing is much neater and fully in line with the way Coleco did it.

I've also changed some other bits I guessed at that turned out not as Coleco intended. I want this to be seamlessly compatible.

Mode0 on the V9958 is connected to A0 as Mode is on the TMS9918a while Mode1 is connected to A1 - seemed logical to me!*

*EDIT*

Actually I need to think about this again! Of course A0, along with the MUX, decides between ports ...BEH (Data) and ...BFH (Registers) for the TMS9918a.  

So... as far as I can see 9918 and 9958 Mode and Mode0 lines are equivalent, it's Mode1 on the 9958 that brings the extra fun. If I attach that to A1 on the same base address that won't fly! I guess I need to choose another pair of base address for Mode1 and hook that line to A0 too... I must go see if I can find an MSX2+ schematic from somewhere to check.

 

So, at worst, this should be a compatible GFX card that brings RGB out to the table along with less sprite flickering; assuming I understood the docs correctly.

At best this adds all the extra goodies that come with the V9958 for those who want to code for them, along with a cr*p ton of extra RAM.

 

Thoughts:

Proper, non serial, 80 column support would be nice.

This potentially opens the door to MSX2(+) ports - running code directly could be achievable if I add an MSX-compatible addressing mode.

If I go totally bananas it might be fun to add a Y8950 to the mix, and a smidge of RAM, to cover the full MSX experience and possibly SGM duties too.

 

Rationale:

I went for a V9958 because they seem to be readily available, and are software compatible with the TMS9918a.

Old school RAM because 41464's aren't hard to find.

Having looked in to using SRAM I couldn't see any benefit. With the extra logic required using SRAM wouldn't save space and could bring up hard to fix timing issues.

Full VRAM and XRAM support because it wasn't a problem and adding stuff later is more of a pain than not fully populating a design.

15Khz VGA because it was easy enough to do and isn't a huge hassle to use with modern equipment.

I guess the V9958 carries the lines for encoding video for other formats, but that's a whole bunch of extra IC's and thinking to do.

 

Suggestions:

If there's interest I'd appreciate questions and thoughts on what anyone might want from such a board. For instance I'm currently of a mind to do a separate port expander dongle rather than a pass-through connector. 

 

Coleco_V9958_brd.png

Coleco_V9958_sch.png

Edited by CharlesMouse

Share this post


Link to post
Share on other sites
Posted (edited)

Oh, well... still plugging away.

 

Because, understandably, Coleco chose BE & BF for the 9918's ports it won't be straightforward to just add a couple more ports to that address:

Coleco  9918
BC 1011 1100
BD 1011 1101
BE 1011 1110 - Data A0=0 Mode(0)
BF 1011 1111 - Regs A0=1 Mode(0)
C0 1100 0000
C1 1100 0001

MSX2(+) 9938 (9958)
98 1001 1000 A1=0 Mode1 A0=0 Mode0 Data
99 1001 1001 A1=0 Mode1 A0=1 Mode0 Regs
9A 1001 1010 A1=1 Mode1 A0=0 Mode0 Palette
9B 1001 1011 A1=1 Mode1 A0=1 Mode0 Regs

If Coleco had chosen BC and BD as the 9918 port addresses it would have been easy to add two more ports to that but the bit pattern just doesn't work for the 9958 where the current ports are and gets worse if you try for the logical option of the two addresses either side.

 

Options:

1) I use the ports at BC and BD and play silly bugg*rs with some NOT gates to make the bit pattern to line up as the 9958 expects.

The down side is coding for the 9958 would be less logical as the port order would be backwards.

2) I just say "scr*w it" and keep the Coleco addressing for compatibility (with a couple of NOT gates) and do the standard MSX2 addressing at 98-9B.

Great for compatibility, if more IC's...

...do addresses 98-9B clash with anything on the Coleco side..? I guess a quick look at the TRM is in order.

Another *EDIT*

Ah! It seems the Coleco 9918 ports are duplicated at A0H, so:

MSX2(+) 9938 (9958)
98 1001 1000 A1=0 Mode1 A0=0 Mode0 Data
99 1001 1001 A1=0 Mode1 A0=1 Mode0 Regs
9A 1001 1010 A1=1 Mode1 A0=0 Mode0 Palette
9B 1001 1011 A1=1 Mode1 A0=1 Mode0 Regs

Coleco Again
A0 1010 0000 - Data A0=0 Mode(0)
A1 1010 0001 - Regs A0=1 Mode(0)
A2 1010 0010
A3 1010 0011

That will do rather nicely for the 9958 addressing too. 🙂

It doesn't look like that clashes with anything and as a bonus it doesn't look like the standard MSX2 port range is used either so that could be an option.

So...time to wrap my head around some addressing:

I still need to have a think about how I do the addressing. If I just go with the way Coleco did it (great, less thinking for me!) and programmers always access the VDP via the A0 base address all is good. But if the BE base is ever used with a 9958 attached that won't fly...

...and while I could just flip the 'naughty' A1 bits for BE/BF addressing that would mess up A0-A3 addressing. Hrrm... Maybe I stick with my first inclination and leave the Coleco addressing as is (with A1 bit flip for the 9958) and add MSX2-like addressing on top. *sigh* more IC's...

Edited by CharlesMouse

Share this post


Link to post
Share on other sites
Posted (edited)

Evil goings on with XOR gates...

 

So here's the issues:

1) While accessing the 9958 from A0H / A1H is safe if you think you are accessing a 9918 (all software for now) doing so from BEH / BFH won't as the 9958 sees A1 and if it's high you end up in the extra addressing modes - no good!

So if it's being accessed from BEH / BFH we can assume software is expecting a 9918 and we need to flip that A1 bit to zero. Under all other circumstances all should be well so don't flip that bit...

...as it happens A2 is also 1 for BEH / BFH and a zero for all other reasonable circumstances so if we XOR A1 with A2 and feed that output to the 9958's Mode1 pin we get a zero when we are certain we're in 9918 mode and unchanged action otherwise... I think!

2) What about 9958 mode..? Looking at the bit pattern for A0H... A1H (Coleco) and 98H... 9BH (MSX2) the only difference that the Coleco decoding logic sees is on A5 - one for the Coleco and zero for the MSX. So, it seems, I could just tie the A5 input for the DeMUX IC high, but for some reason that doesn't feel quite right to me... So with some spare XOR gates I'll feed an inverted A5 into another XOR along with A5 which should 'select' a logic high on A5 regardless, ah-hem! 

 

Having checked for potential 'gotchas' the Coleco's method of decoding ports is a bit, er, dodgy. It seems it will 'decode' a fair old range of addresses as 'good':

Coleco Range
A0 1010 0000 - Data A0=0 Mode(0)
A1 1010 0001 - Regs A0=1 Mode(0)
...to...
A2,A3 or AA, AB - Bad if 9918 mode! 
AF 1010 1111

B0 1011 0000
B2,B3 or BA, BB - Bad if 9918 mode!
...to...
BE 1011 1110 - Data A0=0 Mode(0)
BF 1011 1111 - Regs A0=1 Mode(0)

...and now likewise for the MSX2 decoding I've added. Happily it looks like:

1) There are no obvious clashes

2) 'Unsupported' ports are nearly all fine...

...because of the way I'm attempting to trap and correct BEH / BFH calls to what's expected to be a 9918 there are two areas where it all goes a bit runny if you think you're calling a 9918. At this point I'm declaring 'good enough'.

 

So:

With the addition of a 74LS136 this board should behave as the native VDP if you access it in a reasonably sensible fashion.

If called via A0H... A3H you get full access to the 9958 in a 'Coleco friendly' manor.

If called via 98H... 9BH you get full access to the 9958 using the standard MSX2 addressing.

 

Given I started this project as a bit of a "what if?" it's coming along better than I'd hoped so it might actually see the light of day. I'm feeling quite pleased with myself so now's the time to bring me down with a bump by telling me all the things I've done wrong:-

 

GFX_9958.sch.png

Edited by CharlesMouse

Share this post


Link to post
Share on other sites
4 hours ago, grips03 said:

sounds like a neat project. 

You're most kind 🙂

 

Further progress, of a sort... If MSX software compatibility is possible a sound chip will be needed, and it seems I can squeeze an AY on the board without making it too much bigger. Although I wish I could come up with a more efficient method to decode the AY... I'm also not confident I've got the addressing right for functional SGM compatibility.

 

Sadly the real fly in the ointment, and seemingly the explanation as to why the SGM uses the ports it does for sound, is Coleco's video addressing clashes with the ports MSX machines use for audio. Oh well that puts an end to thoughts of just playing MSX(2) games on Coleco systems, some modifying will be needed.

 

FWIW I've attached my initial schematic for V9958 and AY sound but I guess I'll have to drop that idea. Video card only it is, and at some point I'll also do a pass-through board so it can be used with an SGM. Wishful thinking, I know, but if this plan actually works out I'd be very pleased if the makers of the SGM brought out a update that includes a V9958.

 

For now I'll call this an RGB card for Coleco systems that has potential to do much more.

Coleco_AV_v1r.png

Share this post


Link to post
Share on other sites
Posted (edited)

Deep breath...

 

I really started this particular exploration for something to do while waiting on PCB's and didn't expect to come this far so fast... indeed I really expected to quickly find such an undertaking to be completely beyond me.

 

With that in mind below is my 'final' design, for now. Much to my surprise I guess I'm close to sending off another order to Seeed.

 

Nothing is set in stone so if anyone wants to chime-in be my guest. Here's the feature-set for now:

-Yamaha V9958 based expansion board for both the Colecovision and ADAM

-Primarily as an Old School way to get better video output from Coleco's machines

-Should be fully compatible with Coleco's implementation of the TMS9918a

-MSX2+ graphics capabilities within reach, including an 80 column mode

-Apart from a superset of Coleco's standard addressing it also supports MSX(2(+)) addressing

-I've added a side port pass-through so current devices can be used too - I have some thoughts of my own

-While port clashes mean I can't add a fully MSX compatible sound chip there's still the SGM...

...even if I can't bring full MSX2+ compatibility this is close enough to make porting games fairly straightforward 

 

If this design actually proves to be functional wishful thinking means I'd really like to see it become popular and somewhat supported. I'm not in a position to go in to production but would be very happy for anyone else to do so... as an example an updated SGM with close to MSX2+ compatibility would be awesome.

 

"...and I'd like a toilet made out of solid gold but it's just not on the cards, baby."

 

 

Pie in the Sky aside, here's the latest iteration: 

 

GFX_9958_v8r_sch.png

GFX_9958_v8r_brd.png

Edited by CharlesMouse

Share this post


Link to post
Share on other sites
Posted (edited)

About ay8910 support, you may consider to patch the msx bios in order to use your custom ports. 

Standard games should not use the HW directly but only trough the msx bios. 

The main exception is the vdp, where 98h and 99h ports are a standard de facto. 

Not all games are fully compliant to the standard for audio access but patching the bios is a starting point 

Edited by artrag

Share this post


Link to post
Share on other sites

Thanks for the info, I can't say I have much (any) familiarity with MSX machines. It's actually nice to know device access as supposed to go through the BIOS, that does indeed potentially help running MSX games on Coleco hardware. Not within my skill-set I'm afraid, but you never know.

For now I'll likely stick with this being a GFX card for Coleco systems. I've added a pass-through connector for other devices such as the SGM, and if this board works I intend to design add-ons such as an AY and RAM board. With that in mind I think a case with room for internal and external expansion would be nice... something like this?

 

 

Coleco V9958_1.png

Coleco V9958_2.png

Coleco V9958_3.png

Share this post


Link to post
Share on other sites
Posted (edited)

Ok, ok... not quite done yet.

 

While paranoia dictates re-re-re-checking everything before I send off for some PCB's to be made I hummed and harred about that VGA connector. I had gone for a 9Pin jobbie to save any confusion as this board is 15Khz only... but I've changed it for a 15Pin version.

While that might cause some confusion 15Pin cables are much easier to come by. Yes, one could use a serial cable but they aren't generally as well shielded as proper video cables - the base purpose of this board is better video output after all. Also as anyone without SCART, the good fortune to have a 15KHz compliant LCD, or a good old CRT monitor, will probably use a converter box a 15Pin connector is probably more useful.

 

So... I 'think' that's it. At least until PCB's come back and I (almost) inevitably have to go chasing the various mistakes I've not noticed. 

 

PS

I had to do my own footprint for the 9958 as the 64Pin package and the 1.78mm pin width aren't standard. I don't really want to solder a precious 9958 to an untested design... does anyone know where I could buy a socket that would fit this IC, or some weird-ass pin-strips?

 

CV_ADAM_9958_brd.png

CV_ADAM_9958_sch.png

Edited by CharlesMouse

Share this post


Link to post
Share on other sites

IIRC Digikey has some sockets for it.

 

Nice job on your layout. I was thinking of persuing a similar card. My idea was to ditch the DRAM and use some SMT SRAM instead to make a smaller package, and to make a piggyback board to replace the internal VDP, but I like what you've done here.

 

You'll need to write a patch to at least program the palette registers on the 9958 as by default all colors are black.

Share this post


Link to post
Share on other sites

Colecovision and an msx computer already share the same graphics chip.  The v9958 would be more like the msx2+.  The opcode sgm adds an msx compatible sound chip helping with software compatibility.  The two machines have different memory maps and rom bios so true compatibility might not be possible.

Share this post


Link to post
Share on other sites

I know some projects use mini din type connector from Sega Genesis 2.  That way one can buy pre-made scart cable and you don't need to make one.  Would that be possible?

 

or Genesis 1 DIN video connector if space allows.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...