trunk/src/mess/drivers/smc777.c
| r20260 | r20261 | |
| 27 | 27 | #include "formats/basicdsk.h" |
| 28 | 28 | #include "imagedev/flopdrv.h" |
| 29 | 29 | |
| 30 | #define SMC777_NUMPENS (0x10+8) //16 palette entries + 8 special colors |
| 30 | 31 | |
| 31 | 32 | class smc777_state : public driver_device |
| 32 | 33 | { |
| r20260 | r20261 | |
| 109 | 110 | UINT8 *vram = machine().root_device().memregion("vram")->base(); |
| 110 | 111 | UINT8 *attr = machine().root_device().memregion("attr")->base(); |
| 111 | 112 | UINT8 *gram = memregion("fbuf")->base(); |
| 113 | UINT8 *gfx_data = machine().root_device().memregion("pcg")->base(); |
| 114 | |
| 112 | 115 | int x_width; |
| 113 | 116 | |
| 114 | 117 | bitmap.fill(machine().pens[m_backdrop_pen], cliprect); |
| r20260 | r20261 | |
| 192 | 195 | { |
| 193 | 196 | for(xi=0;xi<8;xi++) |
| 194 | 197 | { |
| 195 | | UINT8 *gfx_data = machine().root_device().memregion("pcg")->base(); |
| 196 | 198 | int pen; |
| 197 | 199 | |
| 198 | 200 | pen = ((gfx_data[tile*8+yi]>>(7-xi)) & 1) ? (color+m_pal_mode) : bk_pen; |
| 199 | 201 | |
| 200 | | if(pen != -1) |
| 202 | if ((pen != -1) && (pen < SMC777_NUMPENS)) |
| 201 | 203 | bitmap.pix16(y*8+CRTC_MIN_Y+yi, x*8+CRTC_MIN_X+xi) = machine().pens[pen]; |
| 202 | 204 | } |
| 203 | 205 | } |
| r20260 | r20261 | |
| 1052 | 1054 | *************************************/ |
| 1053 | 1055 | |
| 1054 | 1056 | |
| 1057 | |
| 1055 | 1058 | //------------------------------------------------- |
| 1056 | 1059 | // sn76496_config psg_intf |
| 1057 | 1060 | //------------------------------------------------- |
| r20260 | r20261 | |
| 1080 | 1083 | MCFG_SCREEN_VISIBLE_AREA(0, 660-1, 0, 220-1) //normal 640 x 200 + 20 pixels for border color |
| 1081 | 1084 | MCFG_SCREEN_UPDATE_DRIVER(smc777_state, screen_update_smc777) |
| 1082 | 1085 | |
| 1083 | | MCFG_PALETTE_LENGTH(0x10+8) //16 palette entries + 8 special colors |
| 1086 | MCFG_PALETTE_LENGTH(SMC777_NUMPENS) |
| 1084 | 1087 | MCFG_GFXDECODE(smc777) |
| 1085 | 1088 | |
| 1086 | 1089 | MCFG_MC6845_ADD("crtc", H46505, MASTER_CLOCK/2, mc6845_intf) /* unknown clock, hand tuned to get ~60 fps */ |