dev_pvr.cc File Reference

Back to the index.

Classes | Macros | Functions
dev_pvr.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cpu.h"
#include "device.h"
#include "devices.h"
#include "float_emul.h"
#include "machine.h"
#include "memory.h"
#include "misc.h"
#include "timer.h"
#include "thirdparty/dreamcast_pvr.h"
#include "thirdparty/dreamcast_sysasicvar.h"

Go to the source code of this file.

Classes

struct  pvr_data
 
struct  pvr_data_alt
 

Macros

#define INTERNAL_FB_ADDR   0x300000000ULL
 
#define PVR_FB_TICK_SHIFT   18
 
#define PVR_VBLANK_HZ   60.0
 
#define PVR_MARGIN   16
 
#define VRAM_SIZE   (8*1048576)
 
#define PVR_DMA_MEMLENGTH   0x100
 
#define N_PVR_DMA_REGS   (PVR_DMA_MEMLENGTH / sizeof(uint32_t))
 
#define PVR_ADDR   0x00
 
#define PVR_COUNT   0x04
 
#define PVR_MODE   0x08
 
#define PVR_LMMODE0   0x84
 
#define PVR_LMMODE1   0x88
 
#define REG(x)   (d->reg[(x)/sizeof(uint32_t)])
 
#define DEFAULT_WRITE   REG(relative_addr) = idata;
 

Functions

 DEVICE_ACCESS (pvr_ta)
 
void pvr_dma_transfer (struct cpu *cpu, struct pvr_data *d)
 
 DEVICE_ACCESS (pvr_dma)
 
 DEVICE_ACCESS (pvr_dma_more)
 
void pvr_fb_invalidate (struct pvr_data *d, int start, int stop)
 
void pvr_geometry_updated (struct pvr_data *d)
 
void pvr_render (struct cpu *cpu, struct pvr_data *d)
 
void pvr_ta_init (struct cpu *cpu, struct pvr_data *d)
 
 DEVICE_ACCESS (pvr)
 
void pvr_extend_update_region (struct pvr_data *d, uint64_t low, uint64_t high)
 
 DEVICE_TICK (pvr_fb)
 
 DEVICE_ACCESS (pvr_vram_alt)
 
 DEVICE_ACCESS (pvr_vram)
 
 DEVINIT (pvr)
 

Macro Definition Documentation

◆ DEFAULT_WRITE

#define DEFAULT_WRITE   REG(relative_addr) = idata;

Definition at line 159 of file dev_pvr.cc.

Referenced by DEVICE_ACCESS().

◆ INTERNAL_FB_ADDR

#define INTERNAL_FB_ADDR   0x300000000ULL

Definition at line 76 of file dev_pvr.cc.

Referenced by DEVINIT().

◆ N_PVR_DMA_REGS

#define N_PVR_DMA_REGS   (PVR_DMA_MEMLENGTH / sizeof(uint32_t))

Definition at line 87 of file dev_pvr.cc.

◆ PVR_ADDR

#define PVR_ADDR   0x00

Definition at line 89 of file dev_pvr.cc.

Referenced by DEVICE_ACCESS(), and pvr_dma_transfer().

◆ PVR_COUNT

#define PVR_COUNT   0x04

Definition at line 90 of file dev_pvr.cc.

Referenced by DEVICE_ACCESS(), and pvr_dma_transfer().

◆ PVR_DMA_MEMLENGTH

#define PVR_DMA_MEMLENGTH   0x100

Definition at line 86 of file dev_pvr.cc.

Referenced by DEVINIT().

◆ PVR_FB_TICK_SHIFT

#define PVR_FB_TICK_SHIFT   18

Definition at line 77 of file dev_pvr.cc.

◆ PVR_LMMODE0

#define PVR_LMMODE0   0x84

Definition at line 92 of file dev_pvr.cc.

Referenced by DEVICE_ACCESS().

◆ PVR_LMMODE1

#define PVR_LMMODE1   0x88

Definition at line 93 of file dev_pvr.cc.

Referenced by DEVICE_ACCESS().

◆ PVR_MARGIN

#define PVR_MARGIN   16

Definition at line 81 of file dev_pvr.cc.

Referenced by DEVICE_TICK(), and DEVINIT().

◆ PVR_MODE

#define PVR_MODE   0x08

Definition at line 91 of file dev_pvr.cc.

Referenced by DEVICE_ACCESS().

◆ PVR_VBLANK_HZ

#define PVR_VBLANK_HZ   60.0

Definition at line 79 of file dev_pvr.cc.

Referenced by DEVINIT().

◆ REG

#define REG (   x)    (d->reg[(x)/sizeof(uint32_t)])

◆ VRAM_SIZE

#define VRAM_SIZE   (8*1048576)

Definition at line 83 of file dev_pvr.cc.

Referenced by DEVICE_ACCESS(), DEVICE_TICK(), DEVINIT(), and pvr_geometry_updated().

Function Documentation

◆ DEVICE_ACCESS() [1/6]

DEVICE_ACCESS ( pvr_ta  )

Definition at line 1515 of file dev_pvr.cc.

References data, fatal(), MEM_WRITE, memory_readmax64(), and pvr_data::ta.

◆ DEVICE_ACCESS() [2/6]

DEVICE_ACCESS ( pvr_dma  )

◆ DEVICE_ACCESS() [3/6]

DEVICE_ACCESS ( pvr_dma_more  )

◆ DEVICE_ACCESS() [4/6]

DEVICE_ACCESS ( pvr  )

◆ DEVICE_ACCESS() [5/6]

DEVICE_ACCESS ( pvr_vram_alt  )

◆ DEVICE_ACCESS() [6/6]

DEVICE_ACCESS ( pvr_vram  )

Definition at line 2502 of file dev_pvr.cc.

References data, fatal(), MEM_READ, pvr_extend_update_region(), and pvr_data::vram.

◆ DEVICE_TICK()

DEVICE_TICK ( pvr_fb  )

◆ DEVINIT()

DEVINIT ( pvr  )

◆ pvr_dma_transfer()

void pvr_dma_transfer ( struct cpu cpu,
struct pvr_data d 
)

◆ pvr_extend_update_region()

void pvr_extend_update_region ( struct pvr_data d,
uint64_t  low,
uint64_t  high 
)

◆ pvr_fb_invalidate()

void pvr_fb_invalidate ( struct pvr_data d,
int  start,
int  stop 
)

◆ pvr_geometry_updated()

void pvr_geometry_updated ( struct pvr_data d)

◆ pvr_render()

void pvr_render ( struct cpu cpu,
struct pvr_data d 
)

◆ pvr_ta_init()

void pvr_ta_init ( struct cpu cpu,
struct pvr_data d 
)

Generated on Fri Dec 7 2018 19:52:23 for GXemul by doxygen 1.8.13