Previous 15994 Revisions Next

r11909 Sunday 12th June, 2011 at 21:32:23 UTC by Sandro Ronco
[PCG850V] Made some minor adjustments. (no whatsnew)
[src/mess/drivers]pce220.c

src/mess/drivers/pce220.c
r11908r11909
6868   DECLARE_WRITE8_MEMBER( ram_bank_w );
6969   DECLARE_READ8_MEMBER( timer_r );
7070   DECLARE_WRITE8_MEMBER( timer_w );
71   DECLARE_WRITE8_MEMBER( boot_bank_w );
7172   DECLARE_READ8_MEMBER( port15_r );
7273   DECLARE_READ8_MEMBER( port18_r );
7374   DECLARE_WRITE8_MEMBER( port18_w );
r11908r11909
226227
227228READ8_MEMBER( pce220_state::lcd_data_r )
228229{
229   return m_vram[(m_lcd_index_row*0x40 + m_lcd_index_col) & 0x1ff];
230   return m_vram[(m_lcd_index_row*0x40 + m_lcd_index_col - 1) & 0x1ff];
230231}
231232
232233WRITE8_MEMBER( pce220_state::lcd_data_w )
r11908r11909
254255
255256WRITE8_MEMBER( pce220_state::ram_bank_w )
256257{
257   address_space *space_prg = m_maincpu->memory().space(AS_PROGRAM);
258258   UINT8 bank = BIT(data,2);
259   space_prg->install_write_bank(0x0000, 0x3fff, "bank1");
260259
261260   memory_set_bank(machine(), "bank1", bank);
262261   memory_set_bank(machine(), "bank2", bank);
r11908r11909
272271   m_timer_status = data & 1;
273272}
274273
274WRITE8_MEMBER( pce220_state::boot_bank_w )
275{
276   // set to 1 after boot for restore the ram in the first bank
277   if (data & 0x01)
278   {
279      address_space *space_prg = m_maincpu->memory().space(AS_PROGRAM);
280      space_prg->install_write_bank(0x0000, 0x3fff, "bank1");
281      memory_set_bank(machine(), "bank1", 0);
282   }
283}
284
275285READ8_MEMBER( pce220_state::port15_r )
276286{
277287   /*
r11908r11909
449459
450460READ8_MEMBER( pcg850v_state::g850v_lcd_data_r )
451461{
452   UINT8 data = m_vram[(m_lcd_index_row*0x100 + m_lcd_index_col) & 0x7ff];
462   UINT8 data = m_vram[(m_lcd_index_row*0x100 + m_lcd_index_col - 1) & 0x7ff];
453463
454464   if (m_lcd_read_mode == 1)
455465      m_lcd_index_col++;
r11908r11909
484494   AM_RANGE(0x17, 0x17) AM_WRITE(irq_mask_w)
485495   AM_RANGE(0x18, 0x18) AM_READWRITE(port18_r, port18_w)
486496   AM_RANGE(0x19, 0x19) AM_READWRITE(rom_bank_r, rom_bank_w)
487   AM_RANGE(0x1a, 0x1a) AM_WRITENOP //cleared on BASIC init
497   AM_RANGE(0x1a, 0x1a) AM_WRITE(boot_bank_w)
488498   AM_RANGE(0x1b, 0x1b) AM_WRITE(ram_bank_w)
489499   AM_RANGE(0x1c, 0x1c) AM_WRITENOP //peripheral reset
490500   AM_RANGE(0x1d, 0x1d) AM_READ_PORT("BATTERY")
r11908r11909
508518   AM_RANGE(0x17, 0x17) AM_WRITE(irq_mask_w)
509519   AM_RANGE(0x18, 0x18) AM_READWRITE(port18_r, port18_w)
510520   AM_RANGE(0x19, 0x19) AM_READWRITE(rom_bank_r, rom_bank_w)
511   AM_RANGE(0x1a, 0x1a) AM_WRITENOP //cleared on BASIC init
521   AM_RANGE(0x1a, 0x1a) AM_WRITE(boot_bank_w)
512522   AM_RANGE(0x1b, 0x1b) AM_WRITE(ram_bank_w)
513523   AM_RANGE(0x1c, 0x1c) AM_WRITENOP //peripheral reset
514524   AM_RANGE(0x1d, 0x1d) AM_READ_PORT("BATTERY")
r11908r11909
774784{
775785   address_space *space = m_maincpu->memory().space(AS_PROGRAM);
776786   space->unmap_write(0x0000, 0x3fff);
787
788   // install the boot code into the first bank
777789   memory_set_bankptr(machine(), "bank1", machine().region("user1")->base() + 0x0000);
778790
779791   m_lcd_index_row = 0;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team