Previous 15994 Revisions Next

r14895 Wednesday 11th April, 2012 at 11:24:22 UTC by Robbbert
SPECIAL - bit more tidy up
[src/mess/drivers]special.c
[src/mess/includes]special.h
[src/mess/machine]special.c
[src/mess/video]special.c

src/mess/machine/special.c
r14894r14895
119119*/
120120WRITE8_MEMBER( special_state::video_memory_w )
121121{
122   machine().device<ram_device>(RAM_TAG)->pointer()[0x9000 + offset] = data;
122   m_ram->pointer()[0x9000 + offset] = data;
123123   m_specimx_colorram[offset] = m_specimx_color;
124124}
125125
r14894r14895
136136void special_state::specimx_set_bank(offs_t i, UINT8 data)
137137{
138138   address_space *space = m_maincpu->memory().space(AS_PROGRAM);
139   UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
139   UINT8 *ram = m_ram->pointer();
140140
141141   space->install_write_bank(0xc000, 0xffbf, "bank3");
142142   space->install_write_bank(0xffc0, 0xffdf, "bank4");
r14894r14895
145145   {
146146      case 0 :
147147         space->install_write_bank(0x0000, 0x8fff, "bank1");
148         //space->install_legacy_write_handler(0x9000, 0xbfff, FUNC(video_memory_w));
149148         space->install_write_handler(0x9000, 0xbfff, write8_delegate(FUNC(special_state::video_memory_w), this));
150149
151150         memory_set_bankptr(machine(), "bank1", ram);
r14894r14895
274273   UINT8 bank3 = (m_RR_register >> 4) & 3;
275274   UINT8 bank4 = (m_RR_register >> 6) & 3;
276275   UINT8 *mem = machine().region("maincpu")->base();
277   UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
276   UINT8 *ram = m_ram->pointer();
278277   address_space *space = m_maincpu->memory().space(AS_PROGRAM);
279278
280279   space->install_write_bank(0x0000, 0x3fff, "bank1");
src/mess/includes/special.h
r14894r14895
3232   m_ppi(*this, "ppi8255"),
3333   m_fdc(*this, "wd1793"),
3434   m_dac(*this, "dac"),
35   m_cass(*this, CASSETTE_TAG)
35   m_cass(*this, CASSETTE_TAG),
36   m_ram(*this, RAM_TAG)
3637   { }
3738
3839   DECLARE_WRITE8_MEMBER(specimx_select_bank);
r14894r14895
7576   optional_device<device_t> m_fdc;
7677   optional_device<device_t> m_dac;
7778   optional_device<cassette_image_device> m_cass;
79   optional_device<ram_device> m_ram;
7880};
7981
8082
src/mess/video/special.c
r14894r14895
8989SCREEN_UPDATE_IND16( specimx )
9090{
9191   special_state *state = screen.machine().driver_data<special_state>();
92   UINT8 code,color;
92   UINT8 code, color;
9393   int y, x, b;
9494
9595   for (x = 0; x < 48; x++)
9696   {
9797      for (y = 0; y < 256; y++)
9898      {
99         code = screen.machine().device<ram_device>(RAM_TAG)->pointer()[0x9000 + y + x*256];
99         code = state->m_ram->pointer()[0x9000 + y + x*256];
100100         color = state->m_specimx_colorram[y + x*256];
101101         for (b = 7; b >= 0; b--)
102102            bitmap.pix16(y, x*8+(7-b)) =  ((code >> b) & 0x01)==0 ? color & 0x0f : (color >> 4)& 0x0f ;
r14894r14895
129129SCREEN_UPDATE_IND16( erik )
130130{
131131   special_state *state = screen.machine().driver_data<special_state>();
132   UINT8 code1;
133   UINT8 code2;
134   UINT8 color1,color2;
132   UINT8 code1, code2, color1, color2;
135133   int y, x, b;
136   UINT8 *erik_video_ram_p1;
137   UINT8 *erik_video_ram_p2;
134   UINT8 *erik_video_ram_p1, *erik_video_ram_p2;
138135
139   erik_video_ram_p1 =  screen.machine().device<ram_device>(RAM_TAG)->pointer() + 0x9000;
140   erik_video_ram_p2 =  screen.machine().device<ram_device>(RAM_TAG)->pointer() + 0xd000;
136   erik_video_ram_p1 = state->m_ram->pointer() + 0x9000;
137   erik_video_ram_p2 = state->m_ram->pointer() + 0xd000;
141138
142139   for (x = 0; x < 48; x++)
143140   {
src/mess/drivers/special.c
r14894r14895
577577
578578/*    YEAR  NAME        PARENT    COMPAT   MACHINE    INPUT       INIT        COMPANY      FULLNAME       FLAGS */
579579COMP( 1985, special,    0,        0,       special,   special,    special,   "<unknown>", "Specialist", GAME_NOT_WORKING )
580COMP( 1985, specialm,   special,  0,       special,   special,    special,   "<unknown>", "Specialist M", GAME_NOT_WORKING )
580COMP( 1985, specialm,   special,  0,       special,   special,    special,   "<unknown>", "Specialist M", 0 )
581581COMP( 1985, pioner,     special,  0,       special,   special,    special,   "<unknown>", "Pioner", GAME_NOT_WORKING )
582582COMP( 1985, specialp,   special,  0,       specialp,  specialp,   special,   "<unknown>", "Specialist + hires graph", GAME_NOT_WORKING )
583583COMP( 1985, lik,        special,  0,       special,   lik,        special,   "<unknown>", "Lik", GAME_NOT_WORKING )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team