#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "console.h"
#include "cpu.h"
#include "devices.h"
#include "machine.h"
#include "memory.h"
#include "misc.h"
#include "thirdparty/crmfbreg.h"
Go to the source code of this file.
Classes | |
struct | sgi_gbe_data |
Macros | |
#define | FAKE_GBE_FB_ADDRESS 0x380000000 |
#define | GBE_DEFAULT_XRES 1280 |
#define | GBE_DEFAULT_YRES 1024 |
#define | GBE_DEFAULT_BITDEPTH 8 |
Functions | |
void | get_rgb (struct sgi_gbe_data *d, uint32_t color, uint8_t *r, uint8_t *g, uint8_t *b) |
void | select_palette (struct sgi_gbe_data *d, int palette_nr) |
DEVICE_TICK (sgi_gbe) | |
DEVICE_ACCESS (sgi_gbe) | |
void | dev_sgi_gbe_init (struct machine *machine, struct memory *mem, uint64_t baseaddr) |
#define FAKE_GBE_FB_ADDRESS 0x380000000 |
Definition at line 61 of file dev_sgi_gbe.cc.
#define GBE_DEFAULT_BITDEPTH 8 |
Definition at line 69 of file dev_sgi_gbe.cc.
#define GBE_DEFAULT_XRES 1280 |
Definition at line 67 of file dev_sgi_gbe.cc.
#define GBE_DEFAULT_YRES 1024 |
Definition at line 68 of file dev_sgi_gbe.cc.
Definition at line 736 of file dev_sgi_gbe.cc.
References sgi_gbe_data::bitdepth, CHECK_ALLOCATION, CRMFB_CTRLSTAT_CHIPID_MASK, CRMFB_CTRLSTAT_GPIO3_INPUT, CRMFB_CTRLSTAT_GPIO4_INPUT, CRMFB_CTRLSTAT_GPIO4_SENSE, CRMFB_CTRLSTAT_GPIO5_INPUT, CRMFB_CTRLSTAT_GPIO6_INPUT, CRMFB_CTRLSTAT_INTERNAL_PCLK, sgi_gbe_data::ctrlstat, dev_fb_init(), dev_sgi_gbe_access(), DEV_SGI_GBE_LENGTH, DM_DEFAULT, FAKE_GBE_FB_ADDRESS, sgi_gbe_data::fb_data, GBE_DEFAULT_BITDEPTH, GBE_DEFAULT_XRES, GBE_DEFAULT_YRES, machine_add_tickfunction(), memory_device_register(), sgi_gbe_data::palette, VFB_GENERIC, sgi_gbe_data::xres, sgi_gbe_data::y_intr01, sgi_gbe_data::y_intr23, and sgi_gbe_data::yres.
Referenced by MACHINE_SETUP().
DEVICE_ACCESS | ( | sgi_gbe | ) |
Definition at line 375 of file dev_sgi_gbe.cc.
References sgi_gbe_data::bitdepth, sgi_gbe_data::cmap_select, sgi_gbe_data::color_mode, CRMFB_CMAP, CRMFB_CMAP_FIFO, CRMFB_CTRLSTAT, CRMFB_CTRLSTAT_CHIPID_MASK, CRMFB_CURSOR_BITMAP, CRMFB_CURSOR_CMAP0, CRMFB_CURSOR_CMAP1, CRMFB_CURSOR_CMAP2, CRMFB_CURSOR_CONTROL, CRMFB_CURSOR_POS, CRMFB_DEVICE_ID, CRMFB_DEVICE_ID_DEF, CRMFB_DID_CONTROL, CRMFB_DID_PTR, CRMFB_DOTCLOCK, CRMFB_FRM_CONTROL, CRMFB_FRM_PIXSIZE, CRMFB_FRM_TILESIZE, CRMFB_FRM_TILESIZE_DEPTH_SHIFT, CRMFB_FRM_TILESIZE_RHS_SHIFT, CRMFB_FRM_TILESIZE_WIDTH_SHIFT, CRMFB_GMAP, CRMFB_HCMAP_ON_MASK, CRMFB_I2C_FP, CRMFB_I2C_VGA, CRMFB_MODE_CMAP_SELECT_SHIFT, CRMFB_MODE_TYP_SHIFT, CRMFB_OVR_CONTROL, CRMFB_OVR_TILE_PTR, CRMFB_OVR_WIDTH_TILE, CRMFB_VCMAP_ON_MASK, CRMFB_VT_CRS_STARTXY, CRMFB_VT_DID_STARTXY, CRMFB_VT_FLAGS, CRMFB_VT_FRAMELOCK, CRMFB_VT_HBLANK, CRMFB_VT_HCMAP, CRMFB_VT_HCMAP_ON_SHIFT, CRMFB_VT_HPIX_EN, CRMFB_VT_HSYNC, CRMFB_VT_INTR01, CRMFB_VT_INTR23, CRMFB_VT_VBLANK, CRMFB_VT_VC_STARTXY, CRMFB_VT_VCMAP, CRMFB_VT_VCMAP_ON_SHIFT, CRMFB_VT_VPIX_EN, CRMFB_VT_VSYNC, CRMFB_VT_XY, CRMFB_VT_XYMAX, CRMFB_WID, sgi_gbe_data::ctrlstat, sgi_gbe_data::cursor_bitmap, sgi_gbe_data::cursor_cmap0, sgi_gbe_data::cursor_cmap1, sgi_gbe_data::cursor_cmap2, sgi_gbe_data::cursor_control, sgi_gbe_data::cursor_pos, data, debug, dev_fb_resize(), sgi_gbe_data::dotclock, fatal(), sgi_gbe_data::fb_data, sgi_gbe_data::freeze, sgi_gbe_data::frm_control, sgi_gbe_data::i2c, sgi_gbe_data::i2cfp, if(), MEM_READ, MEM_WRITE, memory_readmax64(), memory_writemax64(), sgi_gbe_data::ovr_control, sgi_gbe_data::ovr_partial_pixels, sgi_gbe_data::ovr_tilesize, sgi_gbe_data::ovr_width_in_tiles, sgi_gbe_data::palette, sgi_gbe_data::partial_pixels, sgi_gbe_data::selected_palette, sgi_gbe_data::tilesize, sgi_gbe_data::width_in_tiles, sgi_gbe_data::xres, sgi_gbe_data::y_intr01, sgi_gbe_data::y_intr23, and sgi_gbe_data::yres.
DEVICE_TICK | ( | sgi_gbe | ) |
Definition at line 163 of file dev_sgi_gbe.cc.
References sgi_gbe_data::bitdepth, sgi_gbe_data::cmap_select, CRMFB_CURSOR_CROSSHAIR, CRMFB_CURSOR_ON, CRMFB_DMA_ENABLE, CRMFB_INTR_0_MASK, CRMFB_INTR_1_MASK, CRMFB_INTR_2_MASK, CRMFB_INTR_3_MASK, sgi_gbe_data::cursor_bitmap, sgi_gbe_data::cursor_cmap0, sgi_gbe_data::cursor_cmap1, sgi_gbe_data::cursor_cmap2, sgi_gbe_data::cursor_control, sgi_gbe_data::cursor_pos, dev_fb_access(), fatal(), sgi_gbe_data::fb_data, sgi_gbe_data::freeze, sgi_gbe_data::frm_control, get_rgb(), x11_md::in_use, cpu::machine, cpu::mem, MEM_READ, MEM_WRITE, cpu::memory_rw, NO_EXCEPTIONS, sgi_gbe_data::ovr_control, sgi_gbe_data::ovr_partial_pixels, sgi_gbe_data::ovr_width_in_tiles, sgi_gbe_data::partial_pixels, PHYSICAL, select_palette(), sgi_gbe_data::width_in_tiles, machine::x11_md, sgi_gbe_data::xres, sgi_gbe_data::y_intr01, sgi_gbe_data::y_intr23, and sgi_gbe_data::yres.
void get_rgb | ( | struct sgi_gbe_data * | d, |
uint32_t | color, | ||
uint8_t * | r, | ||
uint8_t * | g, | ||
uint8_t * | b | ||
) |
Definition at line 112 of file dev_sgi_gbe.cc.
References sgi_gbe_data::color_mode, CRMFB_MODE_TYP_I8, CRMFB_MODE_TYP_RG3B2, CRMFB_MODE_TYP_RGB8, fatal(), and sgi_gbe_data::selected_palette.
Referenced by DEVICE_TICK().
void select_palette | ( | struct sgi_gbe_data * | d, |
int | palette_nr | ||
) |
Definition at line 139 of file dev_sgi_gbe.cc.
References sgi_gbe_data::palette, and sgi_gbe_data::selected_palette.
Referenced by DEVICE_TICK().