User Tools

Site Tools


x68000:vidcon_registers

Overview

AddressSizeNameDescription
$E82000256.wGraphic palette
$E82200256.wText palette, Sprite+BG palette
$E824001.wR0Screen mode
$E825001.wR1Priority control
$E826001.wR2Layer ON/OFF control/Special priority

Graphic palette($e82000):

 The structure of the graphic palette in 16/256 color mode and 65535 color
mode.
   16 color display:
	 The first 16 words are used, the value read from the palette 
	is directly output as a color code.
  256 color display:
	 The first 256 words are used, the value read from the palette 
	is directly output as a color code.
65536 color display:
	 In the text palette and the graphic palette in the 16/256 color
	display mode, the color codes of one word are arranged by the number
	of colors. However, in the 65536 color display mode the color codes
	are divided into upper/lower byte units. Two pairs of 256 bytes that
	are juxtaposed(upper/lower). When color codes are output, the data of
	G-VRAM is divided into upper byte and lower byte, each of which is
	independently determined and then synthesized.
	PH = Upper byte of G-VRAM data
	PL = Lower byte 〃
	CH = Upper byte of color code to be output
	CL = Lower byte 〃 
	CH = *(unsigned char)($E82002+PH×2-PH&1)
	CL = *(unsigned char)($E82000+PL×2-PL&1)
	address	size	CH		CL
	$E82000	1.b	--		PL = $00
	$E82001	1.b	--		PL = $01
	$E82002	1.b	PH = $00	--
	$E82003	1.b	PH = $01	--
	$E82004	1.b	--		PL = $02
	$E82005	1.b	--		PL = $03
	$E82006	1.b	PH = $02	--
	$E82007	1.b	PH = $03	--
			……
			……
	$E821F8	1.b	--		PL = $FD
	$E821F9	1.b	--		PL = $FD
	$E821FA	1.b	PH = $FC	--
	$E821FB	1.b	PH = $FD	--
	$E821FC	1.b	--		PL = $FE
	$E821FD	1.b	--		PL = $FF
	$E821FE	1.b	PH = $FE	--
	$E821FF	1.b	PH = $FF	--
	($E82000 は PL = $00 の時の CL の値、と読むこと)

Text palette($e82200):

 The text palette and the sprite+BG palette are 16 rows
of 16 words and some are shared. The first palette block,
0, is used by the text palette and the value read from
the palette is used as it is.

Sprite+BG palette($e82200):

 Unlike the text palette, you can use all of the palette
blocks 0 to 15. The PCG data contains value of the lower 4
bits, the data of the sprite scroll register and the BG
data area contains value of the upper 4 bits.

Detail

<BOOKMARK:r0> VC R0($e82400):

bit 15                    3  2 1 0
  ┌─────────────────────────┬─┬───┐
  │                         │ │COL│
  └─────────────────────────┴─┴───┘
			    SIZ
bit 2	 SIZ	GVRAM size
		%0  :  512× 512 pixels
		%1  : 1024×1024 pixels
bit 1~0 COL	Color mode
		%00 :	 16 color
		%01 :	256 color
		%10 : Undefined
		%11 : 65536 color
※Set the same value bits as bits 10~8 of CRTC R20.

<BOOKMARK:r1> VC R1($e82500):

bit 15  14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
  ┌───┬───┬───┬───┬───┬───┬───┬───┐
  │   │SP │TX │GR │GP3│GP2│GP1│GP0│
  └───┴───┴───┴───┴───┴───┴───┴───┘
bit 13~12 SP	Sprite screen priority
bit 11~10 TX	Text	〃
bit  9~ 8 GR	Graphic	〃
bit  7~ 6 GP3	Page number of the 4th highest priority graphic screen
bit  5~ 4 GP2	3rd		〃
bit  3~ 2 GP1	2nd		〃
bit  1~ 0 GP0	1st		〃
※SP/TX/GR use %00/$01/$10 to increase the screen priority.
※When the graphic screen is 1 page, GP3~GP0 are handled as one set.
 In case of 2 pages, GP3~GP2/GP1~GP0 are handled as one set each.
※GP3~GP0 setting value
  65536 colors : %1110_0100
    256 colors : %1110_0100(page 1 < page 0)
		%0100_1110(page 0 < page 1)
     16 colors : %1110_0100(page 3 < page 2 < page 1 < page 0)
		    …
		%0001_1011(page 0 < page 1 < page 2 < page 3)

<BOOKMARK:r2> VC R2($e82600):

bit 15 14  13  12  11   10  9   8   7    6   5   4   3   2   1   0
   ┌──┬──┬───┬────┬───┬───┬───┬───┬────┬───┬───┬───┬───┬───┬───┬───┐
   │YS│AH│VHT│EXON│H/P│B/P│G/G│G/T│BCON│SON│TON│GS4│GS3│GS2│GS1│GS0│
   └──┴──┴───┴────┴───┴───┴───┴───┴────┴───┴───┴───┴───┴───┴───┴───┘
bit 15	YS	Video cut
		(Do not display image even when superimposing)
bit 14	AH	Translucent: Text palette 0
		※Force translucent mode on regardless of EXON, H/P, etc.
bit 13	VHT	Translucent: Video image (used in Color Image Unit)
bit 12	EXON	Special priority/Translucent mode enabled
bit 11	H/P	%0 : Special priority selection
		%1 : Translucent mode selection
bit 10	B/P	%0 : Sharp reserved
		%1 : Enable special priority mode
bit  9	G/G	Translucent: Graphic screen
bit  8	G/T	Translucent: text/sprite screen
		※Valid only when the priority of the graphics screen is high
bit  7	BCON	Border color display ON(%1)/OFF(%0)
bit  6	SON	Sprite screen ON(%1)/OFF(%0)
bit  5	TON	Text screen ON(%1)/OFF(%0)
bit  4	GS4	Graphic screen ON(%1)/OFF(%0)
					(When the GVRAM size is 1024x1024)
bit  3~0 GS3~GS0
		Graphic screen ON(%1)/OFF(%0)
					(When the GVRAM size is 512x512)
※When the graphic screen is one page, all the same values are set for 
each bit of GS3~GS0. In the case of 2 pages, GS3~GS2/GS1~GS0 are treated
as one set each and for each bit of the same set, set the same value to each.
x68000/vidcon_registers.txt · Last modified: 2019/08/27 20:45 by 127.0.0.1