Previous 15994 Revisions Next

r5894 Sunday 27th September, 2009 at 02:42:46 UTC by Robbbert
[TRS80] Fixed some potential bugs. Apply forgotten fix to video.
[src/mess/machine]trs80.c
[src/mess/video]trs80.c

src/mess/video/trs80.c
r5893r5894
492492
493493READ8_HANDLER( trs80_videoram_r )
494494{
495   if ((trs80_mode & 0x80) && (trs80_model4 != 2)) offset |= 0x400;
495   if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400;
496496   return videoram[offset];
497497}
498498
499499WRITE8_HANDLER( trs80_videoram_w )
500500{
501   if ((trs80_mode & 0x80) && (trs80_model4 != 2)) offset |= 0x400;
501   if ((trs80_mode & 0x80) && (~trs80_model4 & 1)) offset |= 0x400;
502502   videoram[offset] = data;
503503}
504504
src/mess/machine/trs80.c
r5893r5894
324324   d3 Invert Video
325325   d2 80/64 width
326326   d1 Select bit 1
327   d0 Select bit 0
327   d0 Select bit 0 */
328328
329   Note: Area from 0000-0FFF is controlled by tr80m4p_9c_w below */
330
331329   /* get address space instead of io space */
332330   const address_space *mem = cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
333331
r5893r5894
342340
343341         if (trs80_model4 & 4)   /* Model 4P gets RAM while Model 4 gets ROM */
344342         {
343            if (trs80_model4 & 8)
344               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
345            else
346               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000);
347
345348            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000);
346349            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea);
347350         }
348351         else
349352         {
353            memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
350354            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x01000);
351355            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x037ea);
352356         }
r5893r5894
370374
371375         if (trs80_model4 & 4)   /* Model 4P gets RAM while Model 4 gets ROM */
372376         {
377            if (trs80_model4 & 8)
378               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
379            else
380               memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu") + 0x10000);
381
373382            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x11000);
374383            memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x137e8);
375384            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x137ea);
376385         }
377386         else
378387         {
388            memory_set_bankptr(mem->machine, 1, memory_region(mem->machine, "maincpu"));
379389            memory_set_bankptr(mem->machine, 2, memory_region(mem->machine, "maincpu") + 0x01000);
380390            memory_set_bankptr(mem->machine, 3, memory_region(mem->machine, "maincpu") + 0x037e8);
381391            memory_set_bankptr(mem->machine, 4, memory_region(mem->machine, "maincpu") + 0x037ea);
r5893r5894
950960   memory_install_readwrite8_handler (mem, 0x4000, 0xf3ff, 0, 0, SMH_BANK(7), SMH_BANK(17));
951961   memory_install_readwrite8_handler (mem, 0xf400, 0xf7ff, 0, 0, SMH_BANK(8), SMH_BANK(18));
952962   memory_install_readwrite8_handler (mem, 0xf800, 0xffff, 0, 0, SMH_BANK(9), SMH_BANK(19));
963   trs80m4p_9c_w(mem, 0, 1);   /* Enable the ROM */
953964   trs80m4_84_w(mem, 0, 0);   /* switch in devices at power-on */
954   trs80m4p_9c_w(mem, 0, 1);   /* Enable the ROM */
955965}
956966
957967MACHINE_RESET( lnw80 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team