Subversion Repositories Shiroi

Rev

Rev 42 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42 Rev 43
Line 191... Line 191...
191
 
191
 
192
// extract 13-bit address bus from 64-bit pins
192
// extract 13-bit address bus from 64-bit pins
193
#define MC6847_GET_ADDR(p) ((uint16_t)(p & 0xFFFFULL))
193
#define MC6847_GET_ADDR(p) ((uint16_t)(p & 0xFFFFULL))
194
// merge 13-bit address bus value into 64-bit pins
194
// merge 13-bit address bus value into 64-bit pins
195
#define MC6847_SET_ADDR(p, a) \
195
#define MC6847_SET_ADDR(p, a) \
196
	{ p = ((p & ~0xFFFFULL) | ((a)&0xFFFFULL)); }
196
	{ p = ((p & ~0xFFFFULL) | ((a) & 0xFFFFULL)); }
197
// extract 8-bit data bus from 64-bit pins
197
// extract 8-bit data bus from 64-bit pins
198
#define MC6847_GET_DATA(p) ((uint8_t)(((p)&0xFF0000ULL) >> 16))
198
#define MC6847_GET_DATA(p) ((uint8_t)(((p) & 0xFF0000ULL) >> 16))
199
// merge 8-bit data bus value into 64-bit pins
199
// merge 8-bit data bus value into 64-bit pins
200
#define MC6847_SET_DATA(p, d) \
200
#define MC6847_SET_DATA(p, d) \
201
	{ p = (((p) & ~0xFF0000ULL) | (((d) << 16) & 0xFF0000ULL)); }
201
	{ p = (((p) & ~0xFF0000ULL) | (((d) << 16) & 0xFF0000ULL)); }
202
 
202
 
203
// public constants
203
// public constants