This page is incomplete.

Updates after writes

For the SMS in mode 4, the displayed colours are updated immediately after a write to CRAM.

For the SMS in legacy modes, the colours displayed are unchanged - the TMS9918a modes use a fixed palette, but the CRAM is updated and can be used by switching back to mode 4.

For the GG in SMS mode 4, the behaviour is the same as an SMS.

For the GG in GG mode, any writes to an even address will go to a latch, and CRAM is unchanged. Any subsequent write to an odd address (even a non-consecutive one) will write two bytes to CRAM to define a single palette entry:

    ld hl, $C000       ; CRAM address $0000
    rst 10h            ; Assume this function sets the VDP address
    ld a, $FF          ; Color data
    out ($BE), a       ; CRAM unchanged, latch = $FF
    ld hl, $C021       ; CRAM address $0021
    rst 10h            ; Set the address again
    ld a, $0F          ; Color data
    out ($BE), a       ; CRAM word at $0020 is now $0FFF, and the data at $0000 is unchanged.

Mode 2 palette

SG-1000/SC-3000

These are the colours corresponding to the colour indices on an NTSC TMS9918a:

Value Name Colour
$00 Transparent #000000
$01 Black #000000
$02 Medium Green #47b73b
$03 Light Green #7CCF6F
$04 Dark Blue #5D4EFF
$05 Light Blue #8072FF
$06 Dark Red #B66247
$07 Cyan #5DC8ED
$08 Medium Red #D76B48
$09 Light Red #FB8F6C
$0a Dark Yellow #C3CD41
$0b Light Yellow #D3DA76
$0c Dark Green #3E9F2F
$0d Magenta #B664C7
$0e Gray #cccccc
$0f White #ffffff

Master System/Mark III

The SMS VDP converts the TMS9918a colours into approximate equivalents in the SMS's standard 64-colour palette.

Value Name Palette value Colour ...
$00 Transparent $00 #000000
$01 Black $00 #000000
$02 Medium Green $08 #00AA00
$03 Light Green $0C #00FF00
$04 Dark Blue $10 #000055
$05 Light Blue $30 #0000FF
$06 Dark Red $01 #550000
$07 Cyan $3C #00FFFF
$08 Medium Red $02 #AA0000
$09 Light Red $03 #FF0000
$0a Dark Yellow $04 #555500
$0b Light Yellow $0f #FFFF00
$0c Dark Green $04 #005500
$0d Magenta $33 #FF00FF
$0e Gray $15 #555555
$0f White $3f #FFFFFF

The rightmost column is a comparison to the standard TMS9918a colours. As you can see, they are markedly different (generally, darker).

Game Gear

The Game Gear maps the TMS9918a colours to the corresponding palette indices. However, it does not set the palette, so they are all black (or possibly other values on a console with a BIOS). If a valid palette is written, games are playable; some pirate games were hacked to do this and there is a hacked Tototek menu available that does the same thing.




Return to top
0.335s