Video output with TMS9918 and RomWBW

145 views
Skip to first unread message

Sean Lynch

unread,
Oct 25, 2020, 2:42:51 AM10/25/20
to rc201...@googlegroups.com
Since my goal is to make my rc2014 completely standalone, I spent some time trying to figure out how to get RomWBW to output video with jblang's TMS9918 module. I set the jumpers to the MSX configuration, except that I left the interrupt on NMI. Then I copied the TMS stuff from the N8 config but set TMSMODE to SCG because the clock rate is closer, though I have no idea if that matters or if there's other stuff that needs to change.

I don't know how to make RomWBW use the CRT as its console, but it does initialize the screen and displays a cursor on startup, and I was able to write some characters to the screen using TALK.COM as you can see in the attached picture.

Once I get the CRT console working the next step is to figure out how to use Alan's matrix keyboard interface with the Universal Micro Keyboard for input.
Imagepipe_6.jpg

Alan Cox

unread,
Oct 25, 2020, 9:15:34 AM10/25/20
to rc201...@googlegroups.com
That will be very cool. Currently I have to use the serial just to boot Fuzix on my big Z80 setup before it goes keyboard/tms9918a.

Alan

Wayne Warthen

unread,
Oct 25, 2020, 12:03:23 PM10/25/20
to RC2014-Z80
On Saturday, October 24, 2020 at 11:42:51 PM UTC-7 se...@literati.org wrote:
I don't know how to make RomWBW use the CRT as its console, but it does initialize the screen and displays a cursor on startup, and I was able to write some characters to the screen using TALK.COM as you can see in the attached picture.

There are multiple methods for switching the console to a different device in RomWBW.  I will cover a couple of them below.  However, there is a bit of a problem here because the RC2014 TMS9918 board does not have any inherent keyboard input.  RomWBW expects that the device assigned as the console can do both input and output.  So, at present, if you make the TMS9918 the console, you will lose any ability to enter input.  It would not be hard to add Alan's matrix keybaord interface to the TMS9918 driver as it's input mechanism which would solve that problem.

If you want to create a custom ROM that immediately switches to the TMS9918 as console, just add the following line to your config file:

CRTACT .SET TRUE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP

If you want to switch to the TMS9918 as a console at the RomWBW boot prompt, you can enter the command "I n" where n is the device number of the character device assigned to the TMS9918.

Thanks,

Wayne

Sean Lynch

unread,
Oct 25, 2020, 2:30:10 PM10/25/20
to rc201...@googlegroups.com
Ok, I'd seen the CRTACT setting but figured it had a good chance of making the system useless due to the lack of input you mention. Incorporating the keyboard interface into the tms driver makes sense. I'll start on that once I finish soldering up the module.

Any chance of emulating the MSX keyboard in the BIOS, or is there no way to intercept the I/O?

On Sun, Oct 25, 2020, at 09:03, Wayne Warthen wrote:
> On Saturday, October 24, 2020 at 11:42:51 PM UTC-7 se...@literati.org wrote:
> > I don't know how to make RomWBW use the CRT as its console, but it does initialize the screen and displays a cursor on startup, and I was able to write some characters to the screen using TALK.COM <http://talk.com/> as you can see in the attached picture.
>
> There are multiple methods for switching the console to a different
> device in RomWBW. I will cover a couple of them below. However, there
> is a bit of a problem here because the RC2014 TMS9918 board does not
> have any inherent keyboard input. RomWBW expects that the device
> assigned as the console can do *both* input and output. So, at
> present, if you make the TMS9918 the console, you will lose any ability
> to enter input. It would not be hard to add Alan's matrix keybaord
> interface to the TMS9918 driver as it's input mechanism which would
> solve that problem.
>
> If you want to create a custom ROM that immediately switches to the
> TMS9918 as console, just add the following line to your config file:
>
> CRTACT .SET TRUE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
>
> If you want to switch to the TMS9918 as a console at the RomWBW boot
> prompt, you can enter the command "I n" where n is the device number of
> the character device assigned to the TMS9918.
>
> Thanks,
>
> Wayne
>
> --
> You received this message because you are subscribed to the Google
> Groups "RC2014-Z80" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to rc2014-z80+...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/rc2014-z80/576a85ea-9aa2-4c88-80e9-9fad356f4bb8n%40googlegroups.com <https://groups.google.com/d/msgid/rc2014-z80/576a85ea-9aa2-4c88-80e9-9fad356f4bb8n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Wayne Warthen

unread,
Oct 25, 2020, 4:27:24 PM10/25/20
to RC2014-Z80
On Sunday, October 25, 2020 at 11:30:10 AM UTC-7 se...@literati.org wrote:
Ok, I'd seen the CRTACT setting but figured it had a good chance of making the system useless due to the lack of input you mention. Incorporating the keyboard interface into the tms driver makes sense. I'll start on that once I finish soldering up the module.

Great, I hope you will share your work.
 
Any chance of emulating the MSX keyboard in the BIOS, or is there no way to intercept the I/O?

I'm sure something could be hacked together to do this, but it would break a lot of the RomWBW modular architecture.  I'm not terribly inclined to do it.

-Wayne 

Alan Cox

unread,
Oct 25, 2020, 7:20:39 PM10/25/20
to rc201...@googlegroups.com
On Sun, 25 Oct 2020 at 18:30, Sean Lynch <se...@literati.org> wrote:
Ok, I'd seen the CRTACT setting but figured it had a good chance of making the system useless due to the lack of input you mention. Incorporating the keyboard interface into the tms driver makes sense. I'll start on that once I finish soldering up the module.

I would do it the other way around - wrap the TMS9918A driver in the keyboard one as we have the PS/2 and matrix keyboards.

Alan

Sean Lynch

unread,
Oct 25, 2020, 7:51:05 PM10/25/20
to rc201...@googlegroups.com
You mean because there are two keyboard drivers and only one video driver, so the logic for combining them will be simpler?

Alan Cox

unread,
Oct 25, 2020, 7:59:13 PM10/25/20
to rc201...@googlegroups.com
Yes

Alan

Sean Lynch

unread,
Oct 25, 2020, 8:04:44 PM10/25/20
to rc201...@googlegroups.com
On Sun, Oct 25, 2020, at 13:27, Wayne Warthen wrote:
> On Sunday, October 25, 2020 at 11:30:10 AM UTC-7 se...@literati.org wrote:
> > Ok, I'd seen the CRTACT setting but figured it had a good chance of making the system useless due to the lack of input you mention. Incorporating the keyboard interface into the tms driver makes sense. I'll start on that once I finish soldering up the module.
>
> Great, I hope you will share your work.

Absolutely. I want others to be able to follow the same path and improve on it! I'd like to get everything incorporated into RomWBW but even if it's not in shape for that I'll at least put everything up as a fork on Github.

> > Any chance of emulating the MSX keyboard in the BIOS, or is there no way to intercept the I/O?
>
> I'm sure something could be hacked together to do this, but it would
> break a lot of the RomWBW modular architecture. I'm not terribly
> inclined to do it.

Makes sense. I guess it doesn't even need to be in the BIOS if there's some way to load code that can do its own interception. I'll look into that once I have the keyboard working.

Wayne Warthen

unread,
Oct 25, 2020, 9:44:17 PM10/25/20
to rc201...@googlegroups.com
On Sun, Oct 25, 2020 at 4:20 PM Alan Cox <etched...@gmail.com> wrote:
I would do it the other way around - wrap the TMS9918A driver in the keyboard one as we have the PS/2 and matrix keyboards.

The keyboard modules for CRTs are inherently in separate modules that are then associated with the display using a build time configuration setting.  So, if we get both a PS/2 and Matrix Keyboard interface, either can be chosen as the keyboard interface as desired on a per-system basis.

Sean, if you need any help with how this is done, please let me know.  The TMS9918 driver already has an example of how to associate a keyboard.  Just follow this example as you create a new keyboard module.

Thanks,

Wayne

Sean Lynch

unread,
Oct 25, 2020, 11:15:32 PM10/25/20
to rc201...@googlegroups.com
Thanks! I'm looking forward to learning more about how this stuff works.
Reply all
Reply to author
Forward
0 new messages