Previous 199869 Revisions Next

r33034 Tuesday 28th October, 2014 at 02:19:06 UTC by Jon Sturm
ti85: use direct update handler to remove boot memory mapping hacks

This allows the flash calculators to properly reset pc to 0x0000 instead
of 0x8000 and properly reset all memory banks to page 0x00.
[hash]pet_cass.xml vreader.xml
[src/emu/bus/ecbbus]grip.c
[src/emu/cpu/i386]i386.c
[src/mame]mame.lst
[src/mame/drivers]cps1.c funworld.c naomi.c
[src/mame/includes]konamigx.h
[src/mame/video]konamigx.c
[src/mess/includes]ti85.h
[src/mess/machine]coco.c ti85.c

trunk/hash/pet_cass.xml
r241545r241546
7777      <publisher>Avalon Hill</publisher>
7878      <part name="cass" interface="cbm_cass">
7979         <dataarea name="cass" size="10001002">
80            <rom name="bomber attack (1982)(avalon hill).wav" size="10001002" crc="4ff57e9c" sha1="b795a4d8c2f7891088ee6cf7147d785948d7b887" offset="0" />
80            <rom name="Bomber Attack (1982)(avalon hill).wav" size="10001002" crc="4ff57e9c" sha1="b795a4d8c2f7891088ee6cf7147d785948d7b887" offset="0" />
8181         </dataarea>
8282      </part>
8383   </software>
trunk/hash/vreader.xml
r241545r241546
4747
4848
4949-->
50</softwarelist>
No newline at end of file
trunk/src/emu/bus/ecbbus/grip.c
r241545r241546
681681{
682682   m_base = m_j7->read();
683683   m_page = 0;
684   m_lps = 0;
685684}
686685
687686
trunk/src/emu/cpu/i386/i386.c
r241545r241546
17271727               logerror("CALL: TSS: TSS is busy.\n");
17281728               FAULT(FAULT_TS,selector & ~0x03) // #TS(selector)
17291729            }
1730            if((desc.flags & 0x0080) == 0)
1730            if(desc.flags & 0x0080)
17311731            {
1732               logerror("CALL: TSS: Segment %02x is not present.\n",selector);
1732               logerror("CALL: TSS: Segment is not present.\n");
17331733               FAULT(FAULT_NP,selector & ~0x03) // #NP(selector)
17341734            }
17351735            if(desc.flags & 0x08)
r241545r241546
19771977               logerror("CALL: Task Gate: Gate DPL is less than RPL.\n");
19781978               FAULT(FAULT_TS,selector & ~0x03) // #TS(selector)
19791979            }
1980            if((gate.ar & 0x0080) == 0)
1980            if(gate.ar & 0x0080)
19811981            {
19821982               logerror("CALL: Task Gate: Gate is not present.\n");
19831983               FAULT(FAULT_NP,selector & ~0x03) // #NP(selector)
r241545r241546
20032003               logerror("CALL: Task Gate: TSS is busy.\n");
20042004               FAULT(FAULT_TS,gate.selector & ~0x03) // #TS(selector)
20052005            }
2006            if((desc.flags & 0x0080) == 0)
2006            if(desc.flags & 0x0080)
20072007            {
20082008               logerror("CALL: Task Gate: TSS is not present.\n");
20092009               FAULT(FAULT_NP,gate.selector & ~0x03) // #TS(selector)
trunk/src/mame/drivers/cps1.c
r241545r241546
40024002   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
40034003
40044004   ROM_REGION( 0x0200, "bboardplds", 0 )
4005   ROM_LOAD( "sth63b.1a",    0x0000, 0x0117, BAD_DUMP CRC(c706b773) SHA1(ddfe2e747637eec081a5125cfefcb478a4ba9e76) ) /* Handcrafted but works on actual PCB.  Redump needed */
4005   ROM_LOAD( "sth63b.1a",    0x0000, 0x0117, NO_DUMP )
40064006   ROM_LOAD( "iob1.12d",     0x0000, 0x0117, CRC(3abc0700) SHA1(973043aa46ec6d5d1db20dc9d5937005a0f9f6ae) )
40074007   ROM_LOAD( "bprg1.11d",    0x0000, 0x0117, CRC(31793da7) SHA1(400fa7ac517421c978c1ee7773c30b9ed0c5d3f3) )
40084008
r241545r241546
44834483   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
44844484
44854485   ROM_REGION( 0x0200, "bboardplds", 0 )
4486   ROM_LOAD( "ara63b.1a",    0x0000, 0x0117, BAD_DUMP CRC(f5569c93) SHA1(7db7cf23639036590eef1e5e309f08560859efaf) ) /* Handcrafted but works on actual PCB.  Redump needed */
4486   ROM_LOAD( "ara63b.1a",    0x0000, 0x0117, NO_DUMP )
44874487   ROM_LOAD( "iob1.12d",     0x0000, 0x0117, CRC(3abc0700) SHA1(973043aa46ec6d5d1db20dc9d5937005a0f9f6ae) )
44884488   ROM_LOAD( "bprg1.11d",    0x0000, 0x0117, CRC(31793da7) SHA1(400fa7ac517421c978c1ee7773c30b9ed0c5d3f3) )
44894489
trunk/src/mame/drivers/funworld.c
r241545r241546
63526352   }
63536353
63546354   j = 1;
6355   i = 0x81;
63566355
6357   do
6356   for (i = 0x81; i < (0x81 + ARRAY_LENGTH(rcdino4_keys80));)
63586357   {
63596358      UINT8 key;
63606359
r241545r241546
64196418      while (j < 0x100);
64206419
64216420      j &= 0xff;
6421      do {
6422         assert((i+1 - 0x81) >= 0 && (i+1 - 0x81) < ARRAY_LENGTH(rcdino4_keys80));
6423      } while (!rcdino4_keys80[++i - 0x81]);
64226424
6423      do {} while (((++i - 0x81) < ARRAY_LENGTH(rcdino4_keys80))
6424            && !rcdino4_keys80[i - 0x81]);
6425
6426      if ((i - 0x81) == ARRAY_LENGTH(rcdino4_keys80))
6427      {
6428         break;
6429      }
6430
64316425      if ((i == 0xa4)
64326426         || (i == 0xb0)
64336427         || (i == 0xf8)
r241545r241546
64366430         j = 0; /* re-align offset after skipping some pages */
64376431      }
64386432   }
6439   while (1);
64406433}
64416434
64426435DRIVER_INIT_MEMBER(funworld_state, rcdinch)
trunk/src/mame/drivers/naomi.c
r241545r241546
493493Capcom Vs. SNK Millennium Fight 2000            841-0011C  23511    7 (128Mb)  315-6219   present   317-5059-COM  (000802)
494494Capcom Vs. SNK Millennium Fight 2000 (Rev A)    841-0011C  23511A   7 (128Mb)  315-6219   present   317-5059-COM  (000804)
495495Capcom Vs. SNK Millennium Fight 2000 (Rev C)    841-0011C  23511C   7 (128Mb)  315-6319   present   317-5059-COM  (000904)
496Club Kart: European Session (Rev E)             840-0062C  23704E  11 (128Mb)  315-6319A  present   317-0313-COM
497Club Kart: European Session (Rev D)             840-0062C  23704D  11 (128Mb)  315-6319A  present   317-0313-COM
498Club Kart: European Session (Rev C)             840-0062C  23704C  11 (128Mb)  315-6319A  present   317-0313-COM
496Club Kart: European Session                     840-0062C  23704   11 (128Mb)  315-6319A  present   317-0313-COM
497Club Kart: European Session (Rev D)             840-0062C  21473D  11 (128Mb)  315-6319A  present   317-0313-COM
499498Crackin' DJ                                     840-0043C  23450D  10 (128Mb)  315-6319   present   ?
500499Derby Owners Club II (Rev B)                    840-0083C  22306B  11 (128Mb)  315-6319A  present   not present
501500Derby Owners Club World Edition (Rev C)         840-0088C  22336C   7 (128Mb)  315-6319A  present   not present
r241545r241546
79187917   NAOMI_DEFAULT_EEPROM
79197918
79207919   ROM_REGION( 0xb800000, "rom_board", ROMREGION_ERASEFF)
7921   ROM_LOAD( "epr-23704d.ic22",0x0000000, 0x0400000, CRC(60ac770c) SHA1(2f1688f2046e794d1c1e06912b46c1573d934608) )
7920   ROM_LOAD( "epr-21473d.ic22",0x0000000, 0x0400000, CRC(60ac770c) SHA1(2f1688f2046e794d1c1e06912b46c1573d934608) )
79227921   ROM_LOAD( "mpr-23693.ic1",  0x0800000, 0x1000000, CRC(28995764) SHA1(a1457f9935dde2e5aaa5ef245c736c0f2f8c74b7) )
79237922   ROM_LOAD( "mpr-23694.ic2",  0x1800000, 0x1000000, CRC(37d30111) SHA1(4c07df8cd548cac79d48709e61f692d762471f8f) )
79247923   ROM_LOAD( "mpr-23695.ic3",  0x2800000, 0x1000000, CRC(41ac1510) SHA1(01b889b627fdfc1f12a0c84fcc36debdfb1cf377) )
r241545r241546
79357934   ROM_LOAD( "clubkrte-key.bin", 0, 4, CRC(db426a5d) SHA1(6a6a0b80ec0416605541159efea379dc19fe796d) )
79367935ROM_END
79377936
7938ROM_START( clubkrtc )
7939   NAOMI2_BIOS
7940   NAOMI_DEFAULT_EEPROM
7941
7942   ROM_REGION( 0xb800000, "rom_board", ROMREGION_ERASEFF)
7943   ROM_LOAD( "epr-23704c.ic22",0x0000000, 0x0400000, CRC(45ea13c3) SHA1(48cddba0506010dc705f04457f784a1d455ef3a6) )
7944   ROM_LOAD( "mpr-23693.ic1",  0x0800000, 0x1000000, CRC(28995764) SHA1(a1457f9935dde2e5aaa5ef245c736c0f2f8c74b7) )
7945   ROM_LOAD( "mpr-23694.ic2",  0x1800000, 0x1000000, CRC(37d30111) SHA1(4c07df8cd548cac79d48709e61f692d762471f8f) )
7946   ROM_LOAD( "mpr-23695.ic3",  0x2800000, 0x1000000, CRC(41ac1510) SHA1(01b889b627fdfc1f12a0c84fcc36debdfb1cf377) )
7947   ROM_LOAD( "mpr-23696.ic4",  0x3800000, 0x1000000, CRC(6f2da455) SHA1(b655757bc513398820bfeae07dca8a4f3ea9752c) )
7948   ROM_LOAD( "mpr-23697.ic5",  0x4800000, 0x1000000, CRC(1383c742) SHA1(6efd17632a277a4bb0e47cc912fbc9865a8b14c3) )
7949   ROM_LOAD( "mpr-23698.ic6",  0x5800000, 0x1000000, CRC(da79cd06) SHA1(fdfe068caca1eb764dec28ab327e56b39144f3ae) )
7950   ROM_LOAD( "mpr-23699.ic7",  0x6800000, 0x1000000, CRC(ea77f000) SHA1(35aa8ee804d9429e72f516137a3b06c585a57b6d) )
7951   ROM_LOAD( "mpr-23700.ic8",  0x7800000, 0x1000000, CRC(db9e5c1d) SHA1(db918c0fa1860f4345806e574d44354aba5fcd54) )
7952   ROM_LOAD( "mpr-23701.ic9",  0x8800000, 0x1000000, CRC(0fa92fd7) SHA1(67a1cf085101884a17a4783d0d509ab198aa6425) )
7953   ROM_LOAD( "mpr-23702.ic10", 0x9800000, 0x1000000, CRC(e302b582) SHA1(787192ed9f9a08541eecc3128855485cad802a42) )
7954   ROM_LOAD( "mpr-23703.ic11", 0xa800000, 0x1000000, CRC(702b8b4a) SHA1(3a8dfde458f341e7db20664382b9fce2b6e5d462) )
7955
7956   ROM_REGION( 4, "rom_key", 0 )
7957   ROM_LOAD( "clubkrte-key.bin", 0, 4, CRC(db426a5d) SHA1(6a6a0b80ec0416605541159efea379dc19fe796d) )
7958ROM_END
7959
79607937ROM_START( clubkprz )
79617938   NAOMI2_BIOS
79627939   NAOMI_DEFAULT_EEPROM
r241545r241546
89528929/* 0046 */ GAME( 2001, wldrider, naomi2,  naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Wild Riders (JPN, USA, EXP, KOR, AUS)", GAME_FLAGS )
89538930/* 0061 */ GAME( 2001, vstrik3c, naomi2,  naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Virtua Striker 3 (USA, EXP, KOR, AUS) (Cart, Rev C)", GAME_FLAGS )
89548931/* 0061 */ GAME( 2001, vstrik3cb,vstrik3c,naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Virtua Striker 3 (USA, EXP, KOR, AUS) (Cart, Rev B)", GAME_FLAGS )
8955/* 0062 */ GAME( 2001, clubkrte, naomi2,  naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart: European Session (Rev E)", GAME_FLAGS )
8932/* 0062 */ GAME( 2001, clubkrte, naomi2,  naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart: European Session", GAME_FLAGS )
89568933/* 0062 */ GAME( 2001, clubkrtd, clubkrte,naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart: European Session (Rev D)", GAME_FLAGS )
8957/* 0062 */ GAME( 2001, clubkrtc, clubkrte,naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Club Kart: European Session (Rev C)", GAME_FLAGS )
89588934/* 0080 */ GAME( 2002, vf4cart,  naomi2,  naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Virtua Fighter 4 (Cartridge)", GAME_FLAGS )
89598935/* 0087 */ GAME( 2002, kingrt66, naomi2,  naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "King of Route 66 (Rev A)", GAME_FLAGS )
89608936/* 0095 */ GAME( 2002, soulsurf, naomi2,  naomi2m2, naomi, naomi_state, naomi2,   ROT0, "Sega", "Soul Surfer (Rev A)", GAME_FLAGS )
trunk/src/mame/includes/konamigx.h
r241545r241546
199199   
200200   UINT16 m_prot_data[0x20];
201201   
202   UINT16 *m_gx_spriteram;
203   
204   // mirrored K054338 settings
205   int *m_K054338_shdRGB;
206   
207202   // 1st-Tier GX/MW Variables
208203   // frequently used registers
209204   int m_k053247_vrcbk[4];
r241545r241546
241236       unsupported flipping modes (probably due to the way it's hooked up to the
242237       rest of the chips) which is causing entirely the wrong output.
243238
244    -- furthermore video\k053936.c contains an implementation of
245       the K053936_zoom_draw named K053936GP_zoom_draw that's only used in konamigx ...
239    -- furthermore video/konamigx.c contains it's own implementation of
240       the K053936_zoom_draw named K053936GP_zoom_draw ...
246241
247242
248243    */
249244   bitmap_ind16 *m_gxtype1_roz_dstbitmap;
250245   bitmap_ind16 *m_gxtype1_roz_dstbitmap2;
251246   rectangle m_gxtype1_roz_dstbitmapclip;
252   
253   int m_konamigx_type3_psac2_actual_bank;
254   //int m_konamigx_type3_psac2_actual_last_bank = 0;
255247};
256248
257249// Sprite Callbacks
trunk/src/mame/mame.lst
r241545r241546
54745474vstrik3cb       // 2001.04 Virtua Striker 3 (Rev B) (cartridge)
54755475vstrik3c        // 2001.04 Virtua Striker 3 (Rev C) (cartridge)
54765476wldrider        // 2001.05 Wild Riders
5477clubkrte        // 2001.06 Club Kart: European Session (Rev E)
5477clubkrte        // 2001.06 Club Kart: European Session
54785478clubkrtd        // 2001.06 Club Kart: European Session (Rev D)
5479clubkrtc        // 2001.?? Club Kart: European Session (Rev C)
54805479beachspi        // 2001.07 Beach Spikers
54815480vf4cart         // 2001.08.02 Virtua Fighter 4 (cartridge)
54825481vf4             // 2001.08.02 Virtua Fighter 4 (GD-ROM)
trunk/src/mame/video/konamigx.c
r241545r241546
276276#define GX_MAX_OBJECTS (GX_MAX_SPRITES + GX_MAX_LAYERS)
277277
278278static struct GX_OBJ { int order, offs, code, color; } *gx_objpool;
279static UINT16 *gx_spriteram;
279280
281// mirrored K054338 settings
282static int *K054338_shdRGB;
283
284
280285void konamigx_state::konamigx_mixer_init(screen_device &screen, int objdma)
281286{
282287   m_gx_objdma = 0;
r241545r241546
286291   m_gx_shdzbuf = auto_alloc_array(machine(), UINT8, GX_ZBUFSIZE);
287292   gx_objpool = auto_alloc_array(machine(), struct GX_OBJ, GX_MAX_OBJECTS);
288293
289   m_k054338->export_config(&m_K054338_shdRGB);
294   m_k054338->export_config(&K054338_shdRGB);
290295
291296   if (objdma)
292297   {
293      m_gx_spriteram = auto_alloc_array(machine(), UINT16, 0x1000/2);
298      gx_spriteram = auto_alloc_array(machine(), UINT16, 0x1000/2);
294299      m_gx_objdma = 1;
295300   }
296301   else
297      m_k055673->k053247_get_ram(&m_gx_spriteram);
302      m_k055673->k053247_get_ram(&gx_spriteram);
298303
299304   m_palette->set_shadow_dRGB32(3,-80,-80,-80, 0);
300305   m_k054338->invert_alpha(1);
r241545r241546
310315   UINT16* k053247_ram;
311316   m_k055673->k053247_get_ram(&k053247_ram);
312317
313   if (m_gx_objdma && m_gx_spriteram && k053247_ram) memcpy(m_gx_spriteram, k053247_ram, 0x1000);
318   if (m_gx_objdma && gx_spriteram && k053247_ram) memcpy(gx_spriteram, k053247_ram, 0x1000);
314319}
315320
316321void konamigx_state::konamigx_mixer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect,
r241545r241546
411416      // only enable shadows beyond a +/-7 RGB threshold
412417      for (j=0,i=0; i<3; j+=3,i++)
413418      {
414         k = m_K054338_shdRGB[j  ]; if (k < -7 || k > 7) { shadowon[i] = 1; continue; }
415         k = m_K054338_shdRGB[j+1]; if (k < -7 || k > 7) { shadowon[i] = 1; continue; }
416         k = m_K054338_shdRGB[j+2]; if (k < -7 || k > 7) { shadowon[i] = 1; }
419         k = K054338_shdRGB[j  ]; if (k < -7 || k > 7) { shadowon[i] = 1; continue; }
420         k = K054338_shdRGB[j+1]; if (k < -7 || k > 7) { shadowon[i] = 1; continue; }
421         k = K054338_shdRGB[j+2]; if (k < -7 || k > 7) { shadowon[i] = 1; }
417422      }
418423
419424      // SHDON specifies layers on which shadows can be projected (see detail on p.65 7.2.8)
r241545r241546
491496   {
492497      int pri = 0;
493498
494      if (!(m_gx_spriteram[offs] & 0x8000)) continue;
499      if (!(gx_spriteram[offs] & 0x8000)) continue;
495500
496      int zcode = m_gx_spriteram[offs] & 0xff;
501      int zcode = gx_spriteram[offs] & 0xff;
497502
498503      // invert z-order when opset_pri is set (see p.51 OPSET PRI)
499504      if (m_k053247_opset & 0x10) zcode = 0xff - zcode;
500505
501      int code  = m_gx_spriteram[offs+1];
502      int color = k = m_gx_spriteram[offs+6];
503      l     = m_gx_spriteram[offs+7];
506      int code  = gx_spriteram[offs+1];
507      int color = k = gx_spriteram[offs+6];
508      l     = gx_spriteram[offs+7];
504509
505510      m_k055673->m_k053247_cb(&code, &color, &pri);
506511
r241545r241546
864869
865870
866871         m_k055673->k053247_draw_single_sprite_gxcore(bitmap, cliprect,
867            m_gx_objzbuf, m_gx_shdzbuf, code, m_gx_spriteram, offs,
872            m_gx_objzbuf, m_gx_shdzbuf, code, gx_spriteram, offs,
868873            color, alpha, drawmode, zcode, pri,
869874            /* non-gx only */
870875            0,0,NULL,NULL,0
r241545r241546
922927   SET_TILE_INFO_MEMBER(0, tileno, colour, TILE_FLIPYX(flip));
923928}
924929
930static int konamigx_type3_psac2_actual_bank;
931//int konamigx_type3_psac2_actual_last_bank = 0;
925932
926933WRITE32_MEMBER(konamigx_state::konamigx_type3_psac2_bank_w)
927934{
928935   // other bits are used for something...
929936
930937   COMBINE_DATA(&m_konamigx_type3_psac2_bank[offset]);
931   m_konamigx_type3_psac2_actual_bank = (m_konamigx_type3_psac2_bank[0] & 0x10000000) >> 28;
938   konamigx_type3_psac2_actual_bank = (m_konamigx_type3_psac2_bank[0] & 0x10000000) >> 28;
932939
933940   /* handle this by creating 2 roz tilemaps instead, otherwise performance dies completely on dual screen mode
934   if (m_konamigx_type3_psac2_actual_bank!=m_konamigx_type3_psac2_actual_last_bank)
941   if (konamigx_type3_psac2_actual_bank!=konamigx_type3_psac2_actual_last_bank)
935942   {
936943       m_gx_psac_tilemap->mark_all_dirty();
937       m_konamigx_type3_psac2_actual_last_bank = m_konamigx_type3_psac2_actual_bank;
944       konamigx_type3_psac2_actual_last_bank = konamigx_type3_psac2_actual_bank;
938945   }
939946   */
940947}
r241545r241546
949956
950957   int base_index = tile_index;
951958
952//  if (m_konamigx_type3_psac2_actual_bank)
959//  if (konamigx_type3_psac2_actual_bank)
953960//      base_index+=0x20000/2;
954961
955962
r241545r241546
970977
971978   int base_index = tile_index;
972979
973//  if (m_konamigx_type3_psac2_actual_bank)
980//  if (konamigx_type3_psac2_actual_bank)
974981//      base_index+=0x20000/2;
975982
976983
r241545r241546
14251432      temprect = cliprect;
14261433      temprect.max_x = cliprect.min_x+320;
14271434
1428      if (m_konamigx_type3_psac2_actual_bank == 1) K053936_0_zoom_draw(screen, *m_type3_roz_temp_bitmap, temprect,m_gx_psac_tilemap_alt, 0,0,0); // soccerss playfield
1435      if (konamigx_type3_psac2_actual_bank == 1) K053936_0_zoom_draw(screen, *m_type3_roz_temp_bitmap, temprect,m_gx_psac_tilemap_alt, 0,0,0); // soccerss playfield
14291436      else K053936_0_zoom_draw(screen, *m_type3_roz_temp_bitmap, temprect,m_gx_psac_tilemap, 0,0,0); // soccerss playfield
14301437
14311438
trunk/src/mess/includes/ti85.h
r241545r241546
8686   UINT8 m_ON_interrupt_status;
8787   UINT8 m_ON_pressed;
8888   UINT8 m_flash_unlocked;
89   UINT8 m_ti8x_memory_page_0;
9089   UINT8 m_ti8x_memory_page_1;
9190   UINT8 m_ti8x_memory_page_2;
9291   UINT8 m_ti8x_memory_page_3;
92   bool m_booting;
9393   UINT8 m_LCD_mask;
9494   UINT8 m_power_mode;
9595   UINT8 m_cpu_speed;
r241545r241546
217217   void ti85_setup_snapshot (UINT8 * data);
218218   void ti86_setup_snapshot (UINT8 * data);
219219   DECLARE_SNAPSHOT_LOAD_MEMBER( ti8x );
220   DECLARE_DIRECT_UPDATE_MEMBER( ti83p_direct_update_handler );
220221   
221222   ti83pse_timer m_ctimer[3];
222223   
trunk/src/mess/machine/coco.c
r241545r241546
681681   /* determine the sound mux status */
682682   soundmux_status_t status = soundmux_status();
683683
684    /* the SC77526 DAC chip internally biases the AC-coupled sound inputs for Cassette and Cartridge at the midpoint of the 3.9v output range */
685    bool bCassSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1));
686    bool bCartSoundEnable = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL2));
687    UINT8 cassette_sound = (bCassSoundEnable ? 0x40 : 0);
688    UINT8 cart_sound = (bCartSoundEnable ? 0x40 : 0);
689
690684   /* determine the value to send to the DAC */
691685   m_dac_output = (m_pia_1->a_output() & 0xFC) >> 2;
692   UINT8 dac_sound =  (status == SOUNDMUX_ENABLE ? m_dac_output << 1 : 0);
693   m_dac->write_unsigned8(single_bit_sound + dac_sound + cassette_sound + cart_sound);
686   UINT8 sound_output = single_bit_sound + (status == SOUNDMUX_ENABLE ? m_dac_output << 1 : 0);
687   m_dac->write_unsigned8(sound_output);
694688
695689   /* determine the cassette sound status */
696   cassette_state cas_sound = bCassSoundEnable ? CASSETTE_SPEAKER_ENABLED : CASSETTE_SPEAKER_MUTED;
690   cassette_state cas_sound = (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL1))
691      ? CASSETTE_SPEAKER_ENABLED
692      : CASSETTE_SPEAKER_MUTED;
697693   m_cassette->change_state(cas_sound, CASSETTE_MASK_SPEAKER);
698694
699695   /* determine the cartridge sound status */
700   m_cococart->cart_set_line(COCOCART_LINE_SOUND_ENABLE, bCartSoundEnable ? COCOCART_LINE_VALUE_ASSERT : COCOCART_LINE_VALUE_CLEAR);
696   m_cococart->cart_set_line(
697      COCOCART_LINE_SOUND_ENABLE,
698      (status == (SOUNDMUX_ENABLE | SOUNDMUX_SEL2)) ? COCOCART_LINE_VALUE_ASSERT : COCOCART_LINE_VALUE_CLEAR);
701699}
702700
703701
trunk/src/mess/machine/ti85.c
r241545r241546
154154{
155155   //address_space &space = m_maincpu->space(AS_PROGRAM);
156156
157   m_membank1->set_bank(0); //Always flash page 0, well allmost
157   m_membank1->set_bank(m_booting ? 0x1f : 0); //Always flash page 0, well allmost
158158   
159159   if (m_ti83p_port4 & 1)
160160   {
r241545r241546
182182{
183183   //address_space &space = m_maincpu->space(AS_PROGRAM);
184184   
185   m_membank1->set_bank(m_ti8x_memory_page_0);
185   m_membank1->set_bank(m_booting ? (m_model==TI84P ? 0x3f : 0x7f) : 0);
186186   
187187   if (m_ti83p_port4 & 1)
188188    {
r241545r241546
273273   m_PCR = 0xc0;
274274}
275275
276DIRECT_UPDATE_MEMBER(ti85_state::ti83p_direct_update_handler)
277{
278   if (m_booting)
279   {
280        if (((m_ti83p_port4 & 1) && (address >= 0x4000 && address < 0xc000)) || (address >= 0x4000 && address < 0x8000))
281        {
282            m_booting = false;
283         update_ti83p_memory();
284      }
285    }
286   return address;
287}
288
289
276290MACHINE_RESET_MEMBER(ti85_state,ti83p)
277291{
278292   m_red_out = 0x00;
279293   m_white_out = 0x00;
280294   m_PCR = 0xc0;
281295
282   m_ti8x_memory_page_0 = 0;//0x1f;
283296
284    if (m_model == TI83P)
285    {
286        m_ti8x_memory_page_1 = 0x1f;
287    }
288    else if (m_model == TI84P)
289    {
290        m_ti8x_memory_page_1 = 0x3f;
291    }
292    else
293    {
294       m_ti8x_memory_page_1 = 0x7f;
295    }
296
297    m_ti8x_memory_page_1 = 0;
297298   m_ti8x_memory_page_2 = 0;
298299   m_ti8x_memory_page_3 = 0;
299300   m_ti83p_port4 = 1;
301   m_booting = true;
300302   if (m_model == TI83P)
301303    {
302304        update_ti83p_memory();
r241545r241546
305307    {
306308        update_ti83pse_memory();
307309    }
308
309   m_maincpu->set_pc(0x8000);
310310}
311311
312312MACHINE_START_MEMBER(ti85_state,ti83p)
r241545r241546
314314   m_model = TI83P;
315315   //address_space &space = m_maincpu->space(AS_PROGRAM);
316316   //m_bios = memregion("flash")->base();
317   m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(ti85_state::ti83p_direct_update_handler), this));
317318
318319   m_timer_interrupt_mask = 0;
319320   m_timer_interrupt_status = 0;
320321   m_ON_interrupt_mask = 0;
321322   m_ON_interrupt_status = 0;
322323   m_ON_pressed = 0;
323   m_ti8x_memory_page_0 = 0;//0x1f;
324   m_ti8x_memory_page_1 = 0x1f;
324   m_ti8x_memory_page_1 = 0;
325325   m_ti8x_memory_page_2 = 0;
326326   m_ti8x_memory_page_3 = 0;
327327   m_LCD_memory_base = 0;
r241545r241546
334334   m_ti83p_port4 = 1;
335335   m_flash_unlocked = 0;
336336
337   m_booting = true;
338
337339    ti85_state::update_ti83p_memory();
338   m_maincpu->set_pc(0x8000); //this is a hack due to incomplete memory mapping emulation
339340
340341
341342   machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
r241545r241546
345346   /* save states and debugging */
346347   save_item(NAME(m_timer_interrupt_status));
347348    save_item(NAME(m_timer_interrupt_mask));
348   save_item(NAME(m_ti8x_memory_page_0));
349349   save_item(NAME(m_ti8x_memory_page_1));
350350   save_item(NAME(m_ti8x_memory_page_2));
351351   save_item(NAME(m_ti8x_memory_page_3));
352352   save_item(NAME(m_ti83p_port4));
353   save_item(NAME(m_booting));
353354}
354355
355356void ti85_state::ti8xpse_init_common()
r241545r241546
363364   m_ON_interrupt_mask = 0;
364365   m_ON_interrupt_status = 0;
365366   m_ON_pressed = 0;
366   m_ti8x_memory_page_0 = 00;//0x7f;
367   m_ti8x_memory_page_1 = (m_model != TI84P ) ? 0x7f : 0x3f ;
367   m_ti8x_memory_page_1 = 0;
368368   m_ti8x_memory_page_2 = 0;
369369   m_ti8x_memory_page_3 = 0;
370370   m_LCD_memory_base = 0;
r241545r241546
378378   m_flash_unlocked = 0;
379379
380380   ti85_state::update_ti83pse_memory();
381   m_maincpu->set_pc(0x8000);//same as above, hack to work around incomplete memory mapping emulation
381   m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(ti85_state::ti83p_direct_update_handler), this));
382382
383383
384384   machine().scheduler().timer_pulse(attotime::from_hz(256), timer_expired_delegate(FUNC(ti85_state::ti83_timer1_callback),this));
r241545r241546
391391      /* save states and debugging */
392392   save_item(NAME(m_ctimer_interrupt_status));
393393   save_item(NAME(m_timer_interrupt_status));
394   save_item(NAME(m_ti8x_memory_page_0));
395394   save_item(NAME(m_ti8x_memory_page_1));
396395   save_item(NAME(m_ti8x_memory_page_2));
397396   save_item(NAME(m_ti8x_memory_page_3));


Previous 199869 Revisions Next


© 1997-2024 The MAME Team