Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
534ce852f4 | ||
|
|
4ed3b72995 | ||
|
|
8598eab087 |
+2
-2
@@ -234,7 +234,7 @@ static int cpuOnExecute(VB *sim) {
|
|||||||
#define VB_ON_READ VB_DIRECT_READ
|
#define VB_ON_READ VB_DIRECT_READ
|
||||||
#endif
|
#endif
|
||||||
static int cpuRead(VB *sim, uint32_t address, int type, int32_t *value) {
|
static int cpuRead(VB *sim, uint32_t address, int type, int32_t *value) {
|
||||||
uint32_t cycles = 4; /* TODO: Research this */
|
uint32_t cycles = 0; /* TODO: Research this */
|
||||||
|
|
||||||
/* Retrieve the value from the simulation state directly */
|
/* Retrieve the value from the simulation state directly */
|
||||||
busRead(sim, address, type, value);
|
busRead(sim, address, type, value);
|
||||||
@@ -289,7 +289,7 @@ static int cpuReadFetch(VB *sim, int fetch, uint32_t address, int32_t *value) {
|
|||||||
#endif
|
#endif
|
||||||
static int cpuWrite(VB *sim, uint32_t address, int type, int32_t value) {
|
static int cpuWrite(VB *sim, uint32_t address, int type, int32_t value) {
|
||||||
int cancel = 0;
|
int cancel = 0;
|
||||||
uint32_t cycles = 3; /* TODO: Research this */
|
uint32_t cycles = 0; /* TODO: Research this */
|
||||||
|
|
||||||
/* Reset pseudo-halt */
|
/* Reset pseudo-halt */
|
||||||
if (sim->ph.enabled)
|
if (sim->ph.enabled)
|
||||||
|
|||||||
@@ -900,7 +900,7 @@ VBAPI vbOnWrite vbSetWriteCallback(VB *sim, vbOnWrite callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Determine the size of a simulation instance */
|
/* Determine the size of a simulation instance */
|
||||||
VBAPI size_t vbSizeOf() {
|
VBAPI size_t vbSizeOf(void) {
|
||||||
return sizeof (VB);
|
return sizeof (VB);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ VBAPI vbOnSamples vbSetSamplesCallback (VB *sim, vbOnSamples callback);
|
|||||||
VBAPI uint32_t vbSetSystemRegister (VB *sim, unsigned index, uint32_t value);
|
VBAPI uint32_t vbSetSystemRegister (VB *sim, unsigned index, uint32_t value);
|
||||||
VBAPI void* vbSetUserData (VB *sim, void *tag);
|
VBAPI void* vbSetUserData (VB *sim, void *tag);
|
||||||
VBAPI vbOnWrite vbSetWriteCallback (VB *sim, vbOnWrite callback);
|
VBAPI vbOnWrite vbSetWriteCallback (VB *sim, vbOnWrite callback);
|
||||||
VBAPI size_t vbSizeOf ();
|
VBAPI size_t vbSizeOf (void);
|
||||||
VBAPI int32_t vbWrite (VB *sim, uint32_t address, int type, int32_t value);
|
VBAPI int32_t vbWrite (VB *sim, uint32_t address, int type, int32_t value);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-9
@@ -41,16 +41,17 @@ static const uint8_t BG_TEMPLATES[][64] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* 8-bit color magnitude by brightness level */
|
/* 8-bit color magnitude by brightness level */
|
||||||
|
/* Generated as BRIGHT8[n] = round((n / 132) ** 1.6 * 255) */
|
||||||
static const uint8_t BRIGHT8[] = {
|
static const uint8_t BRIGHT8[] = {
|
||||||
0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 28,
|
0, 12, 19, 24, 29, 33, 37, 41, 44, 48, 51, 54, 57, 60, 63, 65,
|
||||||
30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 57, 59,
|
68, 71, 73, 76, 78, 81, 83, 86, 88, 90, 92, 95, 97, 99,101,103,
|
||||||
61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 86, 88, 90,
|
105,107,109,111,113,115,117,119,121,123,125,127,128,130,132,134,
|
||||||
92, 94, 96, 98,100,102,104,106,108,110,112,113,115,117,119,121,
|
136,137,139,141,142,144,146,148,149,151,153,154,156,157,159,161,
|
||||||
123,125,127,129,131,133,135,137,139,141,142,144,146,148,150,152,
|
162,164,165,167,168,170,172,173,175,176,178,179,181,182,184,185,
|
||||||
154,156,158,160,162,164,166,168,170,171,173,175,177,179,181,183,
|
186,188,189,191,192,194,195,197,198,199,201,202,203,205,206,208,
|
||||||
185,187,189,191,193,195,197,198,200,202,204,206,208,210,212,214,
|
209,210,212,213,214,216,217,218,220,221,222,224,225,226,228,229,
|
||||||
216,218,220,222,224,226,227,229,231,233,235,237,239,241,243,245,
|
230,231,233,234,235,236,238,239,240,242,243,244,245,246,248,249,
|
||||||
247,249,251,253,255
|
250,251,253,254,255
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -548,6 +548,7 @@ static void vsuReset(VB *sim) {
|
|||||||
|
|
||||||
/* Write a typed value to the VSU bus */
|
/* Write a typed value to the VSU bus */
|
||||||
static void vsuWrite(VB*sim,uint32_t address,int type,int32_t value,int debug){
|
static void vsuWrite(VB*sim,uint32_t address,int type,int32_t value,int debug){
|
||||||
|
(void) type;
|
||||||
|
|
||||||
/* Unmapped */
|
/* Unmapped */
|
||||||
if (address & 1)
|
if (address & 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user