⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 system8.c

📁 这个是延伸mame的在wince平台下的游戏模拟器的代码
💻 C
字号:
/*************************************************************************

  The  System8  machine hardware.   By Jarek Parchanski & Mirko Buffoni.

  This files describes the hardware behaviour of a System8 machine.
  It also includes common methods for handling of video hardware.

  Many thanks to Roberto Ventura, for precious information about
  System 8 hardware.

*************************************************************************/

#include "system8.h"

extern int system8_bank;

unsigned char 	*system8_scroll_y;
unsigned char 	*system8_scroll_x;
unsigned char 	*system8_videoram;
unsigned char 	*system8_backgroundram;
unsigned char 	*system8_sprites_collisionram;
unsigned char 	*system8_background_collisionram;
unsigned char 	*system8_scrollx_ram;
int 	system8_videoram_size;
int 	system8_backgroundram_size;

static unsigned char	*bg_ram;
static unsigned char 	*bg_dirtybuffer;
static unsigned char 	*tx_dirtybuffer;
static unsigned char 	*SpritesCollisionTable;
static int	background_scrollx=0,background_scrolly=0;
static unsigned char bg_bank=0,bg_bank_latch=0;

static int		scrollx_row[32];
static struct osd_bitmap *bitmap1;
static struct osd_bitmap *bitmap2;

static int  system8_pixel_mode = 0,system8_background_memory,system8_video_mode=0;

static unsigned char palette_lookup[256*3];



/***************************************************************************

  Convert the color PROMs into a more useable format.

  There are two kind of color handling in System 8 games: in the older ones,
  values in the palette RAM are directly mapped to colors with the usual
  BBGGGRRR format; in the newer ones (Choplifter, WBML), the value in the
  palette RAM is a lookup offset for three palette PROMs in RRRRGGGGBBBB
  format.

  It's hard to tell for sure because they use resistor packs, but here's
  what I think the values are from measurment with a volt meter:

  Blue: .250K ohms
  Blue: .495K ohms
  Green:.250K ohms
  Green:.495K ohms
  Green:.995K ohms
  Red:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -