High resolution graphics for the base/unmodified Superboard II / C1P

Thomas
Posts: 92
Joined: Tue May 30, 2023 8:53 am

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by Thomas »

Scott,
your story sound almost identical to my first SBII display modification, I've made back then.
When I got a 32kb expansion card, the onboard 8k RAM had been available and I decided to build a graphic that was soldered with many wires to the SBII. I used an EXOR gate combination, to enable/disable the combined graphic data by the RTS signal.
Later the mess of wires lead to loose or shortened connections, so I had to remove it again.
For the graphics, I made a modified ROM called OSI-HGR that includes BASIC graphic modes including a full screen Text editor controlled by cursor. Basic commands are:
CLG // Clear screen in HiresMode
[Var=] SCR X,Y // Set screen text position X,Y(0...31) or get Value
Var = INKEY // True Key Poll routine
CLS // Clear Text screen
DEY(T) // Delay for T*100 msec
SET LineNumber // Set DATA read pointer to this Basic line
RAD(D) // converts RAD degree in DEG degree (V*57.2958)
DEG(R) // converts DEG degree in RAD degree (R*0.0174533)
FRAC(R) // Cuts integer value from real R (fractional)
[Var=] CALL Adr,Val // Calls Subroutine by Val (changes $0011)

PLOT X,Y (,M) // Draw/Clear pixel/line in HiresMode X,Y(0...255)
// Set:M=1,Clear:M=0, SetLine:M=2, ClearLine:M=3

NMI & IRQ Routines removed from 01xx Stack area to $0223 and $0226

Ctrl A = Home
Ctrl > = Cursor Right
Ctrl < = Cursor Left
LF = Cursor Down
Shift LF = Cursor UP
Ctrl D = Delete
Ctrl I = Insert

It's included in my Emulator W_Osi, if you want to have a look.
bxdanny
Posts: 416
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by bxdanny »

Thomas,

Are you going to incorporate emulation of your graphics/programmable character board into your version of WinOSI?
No current OSI hardware
Former programmer for Dwo Quong Fok Lok Sow and Orion Software Associates
Former owner of C1P MF (original version) and C2-8P DF (502-based)
Thomas
Posts: 92
Joined: Tue May 30, 2023 8:53 am

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by Thomas »

Yes, actually it's already running with Version 1.9 (I will post it here in a couple of days with some sample code).

BTW, the revised PCB's arrived and on first build, everything worked nicely.
I have added a Blank feature, to software enable/disable the output and to eliminate "snow" during update of the character RAM.
And an additional graphic mode was added, that can be used for color graphics of 128x256 pixels. Each 8 bit character line can have 4 background and 4 foreground colors. Of course the board itself does not have any video output, but an color option output, for an RGB video adapter.

In Emulation, it already works, but the RGB adapter still needs some thinking, how it can be designed for easy installation.
Here the latest Rev D build with no cabling, still just plug and play.

P5.jpg
P5.jpg (183.13 KiB) Viewed 679 times
Thomas
Posts: 92
Joined: Tue May 30, 2023 8:53 am

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by Thomas »

Here a preview of the Emulator using the graphics/programmable character board.
Source code files are in the SOURCE folder.
You can run the test program just by the Load program menu. Source code assembly was done with the Michal Kowalski 6502 Macro Assembler or the updated version from Mark.
The color option is implemented in the character board with an external RGB adapter (which is not yet ready). But you can already see, how it may look like.
For better understanding, some details about the modes implemented:
CR.PNG
CR.PNG (101.13 KiB) Viewed 666 times
Attachments
W_osi_HighresBoard.zip
(21.94 MiB) Downloaded 36 times
Thomas
Posts: 92
Joined: Tue May 30, 2023 8:53 am

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by Thomas »

Here some simple test pattern, to see how it looks like on a "stock" SBII Rev B
Highres.mp4
(4.51 MiB) Downloaded 39 times
This demonstration shows
- Screen font replacement with IBM character set
- Semi graphics (if a 4k EPROM is used for the ROM character set), also demoing the screen blank function
- Graphic mode showing one of 4 segments with graphics, normal and tall characters and full screen graphic fill (all the same byte)
The tall characters are created by reading and converting the ROM characters of the card directly.
As all characters can be redefined in 4 different segments, its possible to create animated characters and move them around similar to animated tiles.
For example making an inverse character set in the upper 128 bytes can be done with a few bytes of code.
Graphics and text can be shown simultaneous but not directly overplayed by hardware, only by software.
bxdanny
Posts: 416
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by bxdanny »

Thomas,

I've tried to make sense of the sample programs in W_osi_HighresBoard.zip, and frankly I haven't been able to. They don't seem to write to anything other than the normal video RAM, so I don't understand how they are changing the character sets, but clearly they are. Is there a way to load a full 2k character set, rather than just 1k (128 characters)? Is there a way to change just a few specified characters, and leave the rest with their default patterns?
No current OSI hardware
Former programmer for Dwo Quong Fok Lok Sow and Orion Software Associates
Former owner of C1P MF (original version) and C2-8P DF (502-based)
Scott Larson
Posts: 42
Joined: Fri Nov 14, 2008 8:32 pm

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by Scott Larson »

Thomas, was your board just a copy of the C1P/SB video circuit like mine was? Once you figure out how it works it's very obvious that you can take out the character ROM and change it to scan RAM directly to display bits. Looking back I guess I could have gotten fancy with a 6845 instead.

I remember the problem was that sometimes bytes didn't get stored into RAM correctly and this resulted in splotches. I'm sure I could have figured out why it was failing but I was using my C1P as a terminal to Unix machines at college so bit mapped graphics wasn't important to me.
Thomas
Posts: 92
Joined: Tue May 30, 2023 8:53 am

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by Thomas »

Scott, the video circuit I've made back then was similar to the C1P/SB circuit, as it used 74LS257 multiplexer to choose between the address bus and the counter chain. The bitmap memory was located above the 32k RAM, which fortunately OSI kept available.
All data/address lines have been single wired to the IC's onto the main board. It looked like a pile of wires but it was working. A true DIY project of that time which motivated me to build several other interfaces to the SBII. The Hofacker computer books for the OSI and PET have been a true treasure trove at that time.

The board shown here is a completely different approach as the intention was, not to have the need to place a single wire nor to do any changes to the machine. This solution provides basically 4 * 2k character RAM's which are used for the 4 * 256bytes segments of the screen. And the RAM(and ROM) can be accessed directly thru the 1K video memory memory, with some trickery.
Thomas
Posts: 92
Joined: Tue May 30, 2023 8:53 am

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by Thomas »

bxdanny wrote: Thu Jun 20, 2024 5:20 pm Thomas,

I've tried to make sense of the sample programs in W_osi_HighresBoard.zip, and frankly I haven't been able to. They don't seem to write to anything other than the normal video RAM, so I don't understand how they are changing the character sets, but clearly they are. Is there a way to load a full 2k character set, rather than just 1k (128 characters)? Is there a way to change just a few specified characters, and leave the rest with their default patterns?
That's correct, only the 1k video memory range is the "communication" path to the character RAM /ROM and the display mode register.
You can write to the display mode register @D3FF without changing the content of the video RAM nor character RAM if you follow the code example sequence. When a new mode is selected, read write operation will be done to the selected memory section, either normal text video memory or character RAM or character ROM.

If you want to load a full 2k character set, you have to select the first half of the 2K, write 1k, select the second half and so on.
Video memory (for the standard versions) is just 1K, so all data transfer have to go thru this window, but it is done at full speed.

Yes, you can change any desired character in the character ROM. They are 8 bytes in a row for each character times 256 = 2K times 4 segments = 8K in total. Be aware , that for full screen graphics you need 4 times 2K. So if you want to change a specified character for the whole screen, you need to do this change in all 4 segments. If you change it for example only in the first 2K, you will have a modified character only in the top 256 byte of the screen.
This is an advantage, as you may have full graphics in the top half of the screen and the bottom half is just standard text window....or the other way around or any other combination. Reading from the character ROM helps a lot to pre-set your character RAM. In the example a 64 character double height text is created that can be show in parallel to 128 standard characters. Or you can create an inverted character set quite easily.
The character ROM on the board can be the original 2k ROM or a 4k EPROM. In the first half o the EPROM you can place any code, character sets or semi graphic characters. This part or the Eprom can be selected and will immediately display the alternative character set.
So a lot of different option, like you see for example on a C64.
bxdanny
Posts: 416
Joined: Thu Apr 16, 2015 2:27 pm
Location: Bronx, NY USA

Re: High resolution graphics for the base/unmodified Superboard II / C1P

Post by bxdanny »

OK, so after a bunch of testing and careful re-reading of Thomas's posts, i figured out how his programmable character board works, well enough to accomplish what I wanted to with it.

One of the disks that nama posted a while ago (DSK00025.65D, to be specific) contained a modified version of the Monster Maze game, intended for use with a different programmable character generator board. That board seems to have been an add-on for the 540 board, that mapped the character generator into RAM at $F000. I don't know if nama had such a board, or if it was someone else whose disk nama eventually got a copy of. At any rate, the copy of the actual Monster Maze program on that disk does not display correctly on either 540 or 600 video. But I still thought using the modified characters that the BASIC part of the program tries to generate was a nice idea, to make the display look more like Pac-Man. And I figured Thomas's programmable-character board could make it work.

So I've now succeeded in getting it to work. The attached file is a ".prg" file for Thomas's emulator; the extension can be changed, but it's not required that it be. Just load it, it contains everything needed.

Here is a screenshot of what it looks like:
MMPM.png
MMPM.png (9.16 KiB) Viewed 628 times
[Actually, the screenshot was generated using Mark's emulator, after I had built the modified character set but before I understood how to program characters on Thomas's system. But it looks the same. The character bit-patterns from nama's disk had to be reversed left to right.]
Attachments
monmazcg.ini
(7.01 KiB) Downloaded 34 times
Post Reply