vdp1: add COLOR_BANK macros for the COLR register
This also adds the directly related SPCTL macros for vdp2.
This commit is contained in:
parent
fcf31ce095
commit
3e162c8d14
15
vdp1.h
15
vdp1.h
@ -102,9 +102,22 @@ enum pmod_bit {
|
|||||||
#define PMOD__COLOR_CALCULATION ( << 0)
|
#define PMOD__COLOR_CALCULATION ( << 0)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// see "Pixel Data in Frame Buffer" in VDP1 manual
|
||||||
|
// see "Figure 9.1" in VDP2 manual
|
||||||
|
// - these two figures refer to the same bits (VDP1 framebuffer data)
|
||||||
|
// see "Scroll Dot Pixels" in the VDP2 manual
|
||||||
|
// - "Dot Color" (DC0, DC1, ...) is described in the "Scroll Dot
|
||||||
|
// Pixels" section.
|
||||||
enum colr_bit {
|
enum colr_bit {
|
||||||
COLR__RGB = (1 << 15)
|
COLR__RGB = (1 << 15)
|
||||||
#define COLR__ADDRESS(n) ((n) >> 3)
|
#define COLR__LOOKUP_TABLE__ADDRESS(n) ((n) >> 3)
|
||||||
|
|
||||||
|
#define COLR__COLOR_BANK__4BPP__PALETTE(n) (((n) & 0x7f) << 4)
|
||||||
|
#define COLR__COLOR_BANK__TYPE0__PR(n) (((n) & 0b11) << 14)
|
||||||
|
#define COLR__COLOR_BANK__TYPE0__CC(n) (((n) & 0b111) << 11)
|
||||||
|
|
||||||
|
#define COLR__COLOR_BANK__TYPE1__PR(n) (((n) & 0b111) << 13)
|
||||||
|
#define COLR__COLOR_BANK__TYPE1__CC(n) (((n) & 0b11) << 11)
|
||||||
};
|
};
|
||||||
|
|
||||||
//enum srca_bit {
|
//enum srca_bit {
|
||||||
|
9
vdp2.h
9
vdp2.h
@ -711,8 +711,13 @@ enum wctld_bit {
|
|||||||
// };
|
// };
|
||||||
// enum lwta1l_bit {
|
// enum lwta1l_bit {
|
||||||
// };
|
// };
|
||||||
// enum spctl_bit {
|
enum spctl_bit {
|
||||||
// };
|
#define SPCTL__SPCCCS(n) (((n) & 0b11) << 12)
|
||||||
|
#define SPCTL__SPCCN(n) (((n) & 0b111) << 8)
|
||||||
|
SPCTL__SPCLMD = (1 << 5),
|
||||||
|
SPCTL__SPWINEN = (1 << 4),
|
||||||
|
#define SPCTL__SPTYPE(n) (((n) & 0b1111) << 0)
|
||||||
|
};
|
||||||
// enum sdctl_bit {
|
// enum sdctl_bit {
|
||||||
// };
|
// };
|
||||||
// enum craofa_bit {
|
// enum craofa_bit {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user