![]() |
|
Colours on a Microbee - Printable Version +- Discussion Forum for all things Microbee (https://microbeetechnology.com.au/forum) +-- Forum: Microbee Forum (https://microbeetechnology.com.au/forum/forum-1.html) +--- Forum: Microbee Software and Documentation (https://microbeetechnology.com.au/forum/forum-7.html) +--- Thread: Colours on a Microbee (/thread-486.html) |
Colours on a Microbee - Under4Mhz - 09-05-2022 How do I set the set the colour attribute table on a colour Microbee? I'd like to support colours in my game where it's supported in the hardware. RE: Colours on a Microbee - MbeeTech - 09-05-2022 (09-05-2022, 08:26 PM)Under4Mhz Wrote: How do I set the set the colour attribute table on a colour Microbee? Colour in the Microbee is set per character cell on the screen. You can set the foreground and background colours separately. The colour ram sits in the same memory space as the Programmable Character Generator (PCG) ram at 0F800h->0FFFFh and can be accessed by switching the Colour ram in and out (replacing the PCG ram in memory space). To do this, I/O port 08h bit 6 controls the colour ram switching. Set bit 6 to switch colour ram into memory at 0F800h -> 0FFFFh (2k) Reset bit 6 to switch the PCG ram back into memory at 0F800h -> 0FFFFh. Use the same offset from the start of the ram block as you would for writing a character to the screen ram IE: If you write a 'T' to 16 characters across on the first line of the screen, and then want to colour the 'T' blue, you would write the value for blue at offset 16 from the start of colour ram (0F800h) = 0F810h This is only a brief overview of course. The best thing to do would be to download the Microbee Technical manual from the repository and read up on the hardware. Note that the original colour scheme and the Premium series colour scheme are different, but are accessed in the same way. RE: Colours on a Microbee - Under4Mhz - 11-05-2022 I've written a test program for colours. I set the colour value from 0 to 255. In summary: - mbee 256TC is using 4 bit colour - mbee 128K is using 5 bit colour - mbee Premium Plus isn't setting colours. Why isn't the premium plus colours being set? Is it using some other method to access the colour table? Should I use the 256TC or 128K colours? How do I set the 256TC to 64 column mode? RE: Colours on a Microbee - MbeeTech - 11-05-2022 (11-05-2022, 12:21 PM)Under4Mhz Wrote: I've written a test program for colours. I set the colour value from 0 to 255. I've never used Mame, so I can't comment on the Premium Plus implementation properly, but it should be just the same as the 256TC output. Same Screen / colour / PCG arrangement. The Premium Series and 256TC are the same in this regard and programmed exactly the same. The Premium Plus is a regular Premium Baseboard (where all the screen stuff is) with a new coreboard ( to do mainly the SDcard Floppy emulation). I don't know why someone (not referring to our member 'someone') would create a mame emulation specific to the Premium Plus unless they are going to emulate the Coldfire second processor as well - without that, it's a regular Premium Series machine. The screen shot of the Premium Plus output seems to be the Boot menu screen colour positioning, with garbage / unwritten screen ram contents. RE: Colours on a Microbee - someone - 11-05-2022 1. Ensure that you are using port 0x08 as the COLOUR PORT. 2. When using the Alpha Plus (Premium Series) and later models, ensure that the APLUS VIDOPTS PORT (port 0x1C) is set correctly. It's best to learn with the APLUS VIDOPTS PORT disabled with a value of 0x00. If it's turned on, then video attributes and video memory bank select are in effect so they too must be correctly populated/configured. The microbee went through 2 colour design iterations: The first used a 2 bits per colour regime on the output connector with the background colour intensity set via bits 1:3 of the COLOUR PORT. Allocation of the colour RAM is split [7:5]=Backgnd, [4:0]=Foregnd (i.e. only 32 colours fore gnd available & 8 colours for backgnd with global intensity control) The COLOUR PORT address as both 0x08 & 0x18. The second used by the Alpha Plus (Premium Series) and later used 4 bits per colour to confirm with the IBM CGA (i.e. 16 colours for both foregnd and backgnd). Allocation of the colour is assigned by NYBBLE - Backgnd = MSN, Foregnd = LSN. The COLOUR PORT address is only 0x08. Both use bit 6 of the COLOUR PORT to switch in the COLOUR RAM into the memory map. This is how things can look when properly configured and working. Beware of the horrible music! RE: Colours on a Microbee - Under4Mhz - 12-05-2022 How do I set the 256TC into 64 column mode? RE: Colours on a Microbee - someone - 13-05-2022 (12-05-2022, 06:03 PM)Under4Mhz Wrote: How do I set the 256TC into 64 column mode?Identically to any other microbee - by reprogramming the CRTC. The best place to grab the default CRTC register values is from the MWB ROMs. The standard initialisation routine configures 16 registers. Also note that the 13.5MHz dot clock microbees use some different values than the 12MHz ones. RE: Colours on a Microbee - MbeeTech - 14-05-2022 (12-05-2022, 06:03 PM)Under4Mhz Wrote: How do I set the 256TC into 64 column mode?Here's a code snippet to set 64 x 16 screen mode : Code: crtc equ 0ch ;6545 control portRE: Colours on a Microbee - Under4Mhz - 15-05-2022 Thanks for the information. Since I'm using sdcc,I updated it to use C: Code: enum {RE: Colours on a Microbee - MbeeTech - 16-05-2022 (15-05-2022, 11:36 AM)Under4Mhz Wrote: Thanks for the information. Since I'm using sdcc,I updated it to use C: Just looking at your code, I see you are only setting a few registers for displayed characters wide x high. I would recommend setting all of the registers in the table previously provided so that you are not relying on the previous screen mode having the correct sync width, display start address etc. Also, you can actually turn off the cursor without putting into an off screen area. I'm not sure what putting it into an off screen address would do to be honest. If you set bit 5 of the cursor start scan line register (R10) this turns off the cursor. |