Display tweaks, add vbGetPixels()
This commit is contained in:
+35
-8
@@ -44,13 +44,26 @@ static void vipThrow(VB *sim, uint16_t cause) {
|
||||
|
||||
/* Transfer one column of frame buffer pixels to output */
|
||||
static void vipTransferColumn(VB *sim, int32_t eye) {
|
||||
int32_t bits; /* Pixel bits from frame buffer */
|
||||
int y, z; /* Iterators */
|
||||
int32_t bits; /* Pixel bits from frame buffer */
|
||||
uint8_t *dest; /* Host frame image output */
|
||||
uint8_t *src; /* Simulation frame buffer input */
|
||||
int y, z; /* Iterators */
|
||||
|
||||
/* Select source and destination addresses in host memory */
|
||||
uint8_t *dest = &sim->vip.frames
|
||||
/* Select destination address in host memory */
|
||||
dest = &sim->vip.frames
|
||||
[sim->vip.dp.buffer][eye][sim->vip.dp.column];
|
||||
uint8_t *src = &sim->vip.ram[
|
||||
|
||||
/* Output is disabled */
|
||||
if ((sim->vip.dp.disp & sim->vip.dp.synce) == 0) {
|
||||
for (z = 0; z < 0x15000; z += 4) {
|
||||
busWriteBuffer(dest, VB_S32, 0);
|
||||
dest += 4;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Select source address in host memory */
|
||||
src = &sim->vip.ram[
|
||||
eye << 16 |
|
||||
sim->vip.dp.buffer << 15 |
|
||||
sim->vip.dp.column << 6
|
||||
@@ -363,9 +376,9 @@ static int vipOnFrame(VB *sim) {
|
||||
|
||||
|
||||
|
||||
/***************************** Library Functions *****************************/
|
||||
/***************************** Display Processor *****************************/
|
||||
|
||||
/* Display processor */
|
||||
/* Process sub-component */
|
||||
static int vipEmulateDisplay(VB *sim, uint32_t clocks) {
|
||||
|
||||
/* Process all clocks */
|
||||
@@ -474,10 +487,24 @@ static int vipEmulateDisplay(VB *sim, uint32_t clocks) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************** Pixel Processor ******************************/
|
||||
|
||||
/* Process sub-component */
|
||||
static void vipEmulateDrawing(VB *sim, uint32_t clocks) {
|
||||
(void) sim;
|
||||
(void) clocks;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************** Library Functions *****************************/
|
||||
|
||||
/* Process component */
|
||||
static int vipEmulate(VB *sim, uint32_t clocks) {
|
||||
int brk = vipEmulateDisplay(sim, clocks);
|
||||
/*vipEmulateDrawing(sim, clocks);*/
|
||||
vipEmulateDrawing(sim, clocks);
|
||||
return brk;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user