Steps for adding a new video display adapter

254 views
Skip to first unread message

Peter Onion

unread,
Mar 23, 2025, 4:48:00 AM3/23/25
to RC2014-Z80
Is anyone interested in me documenting the steps I've taken  to add support for my RP2350 based video/keyboard to HBIOS ?

For the first step I've built a new version of HBIOS with just the version number changed.

 RomWBW HBIOS v3.5.0-rc.0.pjo, 2025-03-23 (App Boot)

PeterO

Tim Radde

unread,
Mar 23, 2025, 11:16:54 AM3/23/25
to RC2014-Z80
Sure.  What does it provide that others of this type don't?  I'd like to hear more details on it as eventually I will need something like this.

Robb Bates

unread,
Mar 23, 2025, 11:49:47 AM3/23/25
to RC2014-Z80
I'd like to see more.

Is it just a more advanced version of the RP2040 VGA serial terminal?  Or is it a display adapter in its own right?

What are its capabilities?

Robb

Robb Bates

unread,
Mar 23, 2025, 11:52:04 AM3/23/25
to RC2014-Z80
Oh, I now see your other posts.  I'm assuming those are about this same device.

Share please!

Robb

Peter Onion

unread,
Mar 23, 2025, 11:54:30 AM3/23/25
to RC2014-Z80
Tim,
It's a port mapped device so doesn't use the SIO at all.  
I'm currently adding the features I need to implement the VDA API., in particular the. I tripped myself while adding the required reverse scroll function up due to unexpected results from the "%" operator when unintentionally mixing signed and unsigned values.  It's working now but I have to look at another example because there seems to be a bug in the cursor positioning code in the driver code I was using as a template.
PeterO

Wayne Warthen

unread,
Mar 23, 2025, 3:18:56 PM3/23/25
to RC2014-Z80
On Sunday, March 23, 2025 at 1:48:00 AM UTC-7 Peter Onion wrote:
Is anyone interested in me documenting the steps I've taken  to add support for my RP2350 based video/keyboard to HBIOS ?

If you do wind up documenting it, there is a "Contrib" folder in the RomWBW distribution where I could include it.  The Contrib folder is under the Doc folder.

Thanks, Wayne 

Bill Shen

unread,
Mar 24, 2025, 1:14:54 AM3/24/25
to RC2014-Z80
I, too, am interested in the process of adding RP2350 to RomWBW.  VGARC is also a port-mapped video display, but when I designed it I had no idea whether it can even work with RomWBW.  Wayne Warthen has done a great job integrating VGARC into RomWBW.  I'm grateful for what Wayne has done, but now I'm curious about how a new port-mapped video hardware is integrated into RomWBW since I'm thinking of another design.
Bill

Peter Onion

unread,
Mar 24, 2025, 4:06:44 AM3/24/25
to rc201...@googlegroups.com
On Sun, 2025-03-23 at 22:14 -0700, Bill Shen wrote:
> I, too, am interested in the process of adding RP2350 to RomWBW.  VGARC is also a port-
> mapped video display, but when I designed it I had no idea whether it can even work with
> RomWBW.  Wayne Warthen has done a great job integrating VGARC into RomWBW.  I'm grateful
> for what Wayne has done, but now I'm curious about how a new port-mapped video hardware
> is integrated into RomWBW since I'm thinking of another design.
> Bill
>

Hi Bill,

I've been looking at VGARC to find out what I need to do, so I don't think there will be
much on the Z80 side of things in my work that will new to you.

What is different is the use of the RP2350 ARM processors and PIO state machines to 
i) Generate video
ii) Provide PS/2 keyboard interface
iii) Act as I/O ports on the Z80 bus

I will be writing those things up when it's all working.

PROGRESS UPDATE:

I spent a frustratingly long time yesterday implementing a "reverse scroll" function as
needed by the VDA interface. Previously my code only had a "forward scroll" as used for
scrolling the screen when doing a line feed when the cursor is on the bottom line of the
display.

The problem was caused by a line number variable becoming negative when scrolling
backwards. I had forgotten that using the "%" operator on negative numbers produces a
negative result, add to that the the result was being put into an unsigned variable, and
maybe a comparison or two between signed and unsigned variables, and you can see why I got
some very strange behaviour which took several hours to firstly understand and then to
fix.

Anyway that is working now, so with all the required functionality implemented on the
RP2380 side I'll be starting on the actual HBIOS code today.

PeterO


Peter Onion

unread,
Mar 24, 2025, 5:21:00 AM3/24/25
to RC2014-Z80
Wayne,
To start with implementing my device (provisionally caller RPVDU, but I'm open to better suggestions) I think I just need to add
RPVDU   .SET TRUE
in a cfg file called RomWBW-3.5.0-rc.0.pjo/Source/HBIOS/Config/RCZ80_pjo.asm
and specify RCZ80_pjo rather than RCZ80_std when building the ROM image.  
Is that correct or does it need to be defined further up the config file hierachy as well ? 

Thanks.
PeterO

Peter Onion

unread,
Mar 24, 2025, 11:51:40 AM3/24/25
to RC2014-Z80
First boot with my "empty driver" included...

*** Launching RomWBW HBIOS v3.5.0-rc.0.pjo, 2025-03-24 for

    RCBus [RCZ80_pjo_std]

RomWBW HBIOS v3.5.0-rc.0.pjo, 2025-03-24 (App Boot)

RCBus [RCZ80_pjo_std] Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1, Z2 MMU
512KB ROM, 512KB RAM, HEAP=0x32FA

LCD: IO=0xDA NOT PRESENT
SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
DSRTC: MODE=STD IO=0xC0 NOT PRESENT
RPVDU: IO=0x48        <<<<<<<<<<<<<<<<<<<<<<<  MY DRIVER :-)
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
IDE: IO=0x10 MODE=RC
IDE0: NO MEDIA
IDE1: NO MEDIA
PPIDE: IO=0x20
PPIDE0: ATA LBA BLOCKS=0x037E3E40 SIZE=28615MB
PPIDE1: NO MEDIA
FP: IO=0x00 NOT PRESENT


PeterO

Wayne Warthen

unread,
Mar 24, 2025, 1:34:25 PM3/24/25
to RC2014-Z80
Hi Peter,

On Monday, March 24, 2025 at 2:21:00 AM UTC-7 Peter Onion wrote:
To start with implementing my device (provisionally caller RPVDU, but I'm open to better suggestions) I think I just need to add
RPVDU   .SET TRUE
in a cfg file called RomWBW-3.5.0-rc.0.pjo/Source/HBIOS/Config/RCZ80_pjo.asm
and specify RCZ80_pjo rather than RCZ80_std when building the ROM image.  
Is that correct or does it need to be defined further up the config file hierachy as well ? 

Congrats on your success adding a VDA driver to RomWBW.  Your implementation of the config files is correct!

Just FYI, I am not prepared to accept new drivers into the repository until I can get v3.5 published.  The code is basically locked down at the moment.  Publishing of v3.5 is taking an agonizingly long time because I was out of the country for 3 weeks and then my wife came home very sick.  She is in the hospital for a few days and I have virutally no time right now.

Thanks,

Wayne

Peter Onion

unread,
Mar 24, 2025, 1:44:31 PM3/24/25
to RC2014-Z80
Hi Wayne,

I hope your wife recovers quickly.

80x43-5.png
As you can see I've made good progress.  I've only implemented the "essential" VDA functions so far (none of the fill/copy/scroll) just enough to get the boot message displaying correctly.
Next is the keyboard input so I can actually get it to boot Zsystem.

And I didn't expect you to be making any additions to 3.5.0 as it is already at the release candidate stage.  I'm not sure anyone else will want to build one anyway.

PeterO

Spencer Owen

unread,
Mar 24, 2025, 1:46:13 PM3/24/25
to rc201...@googlegroups.com
On 24/03/2025 17:34, Wayne Warthen wrote:
> Publishing of v3.5 is taking an agonizingly long time because I was
> out of the country for 3 weeks and then my wife came home very sick. 
> She is in the hospital for a few days and I have virutally no time
> right now.

At the risk of derailing this thread... Sorry to hear about your wife
getting sick. Helping and supporting her is the priority and the v3.5
update can wait.  Priorities are important, and if your wife is in
hospital, a software update, or even user support isn't a priority.

Pass on my best wishes to MrsWBW

Spencer

Peter Onion

unread,
Mar 25, 2025, 5:12:19 AM3/25/25
to RC2014-Z80
Just a few minor things still to do (like scrolling backwards which doesn't seem to be used!)


PeterO

Wayne Warthen

unread,
Mar 25, 2025, 2:56:35 PM3/25/25
to RC2014-Z80
On Tuesday, March 25, 2025 at 2:12:19 AM UTC-7 Peter Onion wrote:
Just a few minor things still to do (like scrolling backwards which doesn't seem to be used!)

Very nice.  I know that WordStar will utilize backward scrolling in certain scenarios (ctrl-W I think).  I thought ZDE did as well, but not certain.

Thanks, Wayne 

Peter Onion

unread,
Mar 25, 2025, 3:20:34 PM3/25/25
to RC2014-Z80
Thanks.  I've been grinning like a cat all day :-)

Backward scroll is on the list to be done, but I've not seen any bad behaviour on the screen without it.  I've spent a few hours going through the pico code tidying it up and adding symbols for all the magic numbers.  I'll do the same to the Z80 code tomorrow.  Right now I'm looking at improving the handling of PS/2 press and release messages.

PeterO

Peter Onion

unread,
Mar 26, 2025, 4:24:35 AM3/26/25
to RC2014-Z80
I'm trying to workout what (if anything) I need to do to get the initial part of the boot output to display on my VDU.
By "initial part" I mean this part ...


*** Launching RomWBW HBIOS v3.5.0-rc.0.pjo, 2025-03-26 for

    RCBus [RCZ80_pjo_std]

RomWBW HBIOS v3.5.0-rc.0.pjo, 2025-03-26 (App Boot)


RCBus [RCZ80_pjo_std] Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1, Z2 MMU
512KB ROM, 512KB RAM, HEAP=0x3225


LCD: IO=0xDA NOT PRESENT
SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
DSRTC: MODE=STD IO=0xC0 NOT PRESENT
RPVDU.1: IO=0x48

MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
IDE: IO=0x10 MODE=RC
IDE0: NO MEDIA
IDE1: NO MEDIA
PPIDE: IO=0x20
PPIDE0: ATA LBA BLOCKS=0x037E3E40 SIZE=28615MB
PPIDE1: NO MEDIA
FP: IO=0x00 NOT PRESENT



I'm using the App Boot process (which by the way is a brilliant feature) so I don't know if that is why that part is still displaying on the SIO before it prints

 Console on Unit #2

after which all output is on the VDU.

I've tried setting BOOTCON to 2 in my config file but that has made no difference.

Any help appreciated.

PeterO

Peter Onion

unread,
Mar 26, 2025, 12:26:36 PM3/26/25
to RC2014-Z80
Booting.png
I found the section in the manual that says you can't use a CRT device to display the early boot info I wanted to display.  So I took that as a challenge :-)

Note there is an extra character device now (Char 2) which provides a "dumb terminal" character interface to my video board.
The only "fudge" I've had to do is to get the ansi terminal to put it's cursor halfway down the screen when it is initialised.

PeterO

Wayne Warthen

unread,
Mar 26, 2025, 2:04:31 PM3/26/25
to RC2014-Z80
On Wednesday, March 26, 2025 at 9:26:36 AM UTC-7 Peter Onion wrote:

I found the section in the manual that says you can't use a CRT device to display the early boot info I wanted to display.  So I took that as a challenge :-)

Note there is an extra character device now (Char 2) which provides a "dumb terminal" character interface to my video board.
The only "fudge" I've had to do is to get the ansi terminal to put it's cursor halfway down the screen when it is initialised.

Right.  It is not officially supported.  As you discovered, it is possible to force it to work if you hack a few things.

Thanks, Wayne 

Peter Onion

unread,
Mar 26, 2025, 3:09:54 PM3/26/25
to RC2014-Z80
I prefer "Working around some limitations" :-)  I've not had to "force" anything, I've only used the provided features for their intended purposes, it's just that I've used a few more of them than might normally be expected :-)

PeterO

Wayne Warthen

unread,
Mar 26, 2025, 4:00:10 PM3/26/25
to RC2014-Z80
On Wednesday, March 26, 2025 at 12:09:54 PM UTC-7 Peter Onion wrote:
I prefer "Working around some limitations" :-)  I've not had to "force" anything, I've only used the provided features for their intended purposes, it's just that I've used a few more of them than might normally be expected :-)

I like it!  😀

-Wayne 
Reply all
Reply to author
Forward
0 new messages