Previous 15994 Revisions Next

r14560 Tuesday 21st February, 2012 at 07:23:32 UTC by Miodrag Milanović
Updated messnew to 145u1 and cleanup of code (no whatsnew)
[docs]messnew.txt
[hash]a800.xml c64_cart.xml vic1001_cart.xml
[src/mess]mess.mak
[src/mess/audio]arcadia.c arcadia.h
[src/mess/devices]microdrv.h
[src/mess/drivers]apollo.c avigo.c c64.c ibmpc.c ip22.c n64.c next.c pce220.c pocketc.c
[src/mess/includes]apollo.h avigo.h next.h
[src/mess/machine]3c505.c a7800.c apollo.c apollo_eth.c apollo_kbd.c apollo_kbd.h apollo_net.c apple2gs.c at.c c64_comal80.c c64_comal80.h c64_dela_ep256.c c64_dela_ep256.h c64_dela_ep64.c c64_dela_ep64.h c64_dela_ep7x8.c c64_dela_ep7x8.h c64_dinamic.c c64_dinamic.h c64_easy_calc_result.c c64_easyflash.c c64_easyflash.h c64_epyx_fast_load.c c64_exos.c c64_fun_play.c c64_fun_play.h c64_georam.c c64_georam.h c64_ieee488.c c64_ieee488.h c64_mach5.c c64_magic_desk.c c64_magic_desk.h c64_magic_formel.c c64_magic_formel.h c64_mikro_assembler.c c64_multiscreen.c c64_ocean.c c64_ocean.h c64_pagefox.c c64_rex.c c64_rex_ep256.c c64_rex_ep256.h c64_ross.c c64_ross.h c64_silverrock.c c64_simons_basic.c c64_stardos.c c64_stardos.h c64_structured_basic.c c64_structured_basic.h c64_super_explode.c c64_super_games.c c64_super_games.h c64_system3.c c64_system3.h c64_vw64.c c64_vw64.h c64_warp_speed.c c64_warp_speed.h c64_westermann.c c64_zaxxon.c c64exp.c c64exp.h cbmipt.c hec2hrp.c isa.h isa_gus.c lynx.c n82077aa.c ncr5390.c ncr5390.h omti8621.c pc1251.c pc1350.c pc1401.c pc1403.c pce.c s100_wunderbus.c sc499.c ser_mouse.c ser_mouse.h serial.c serial.h vic1210.c vic20exp.c wswan.c
[src/mess/machine/ti99]ti99defs.h
[src/mess/video]apollo.c avigo.c isa_svga_cirrus.c

hash/a800.xml
r14559r14560
11321132         </dataarea>
11331133      </part>
11341134   </software>
1135   
1135
11361136   <software name="bombjake" supported="no">
11371137      <description>Bomb Jake</description>
11381138      <year>2009</year>
r14559r14560
49214921         </dataarea>
49224922      </part>
49234923   </software>
4924   
4924
49254925   <software name="yakungfu" supported="no">
49264926      <description>Yie Another Kung-Fu</description>
49274927      <year>2011</year>
hash/vic1001_cart.xml
r14559r14560
16101610         </dataarea>
16111611      </part>
16121612   </software>
1613   
1613
16141614   <software name="fltsim">
16151615      <description>IFR: Flight Simulator</description>
16161616      <year>1983</year>
hash/c64_cart.xml
r14559r14560
77   - Prophet-64
88   - MSSIAH
99   - Rex Diashow-Maker
10   
10
1111   If you have any of these, please forward them to messdev :)
1212
1313   List of mostly undumped cartridges:
r14559r14560
13781378         </dataarea>
13791379      </part>
13801380   </software>
1381   
1381
13821382   <software name="mikroasm">
13831383      <description>Mikro Assembler</description>
13841384      <year>198?</year>
r14559r14560
14331433            <rom name="mmc64v1b.bin" size="0x2000" crc="c6255ad9" sha1="0fc4516ae9fc24da1a4e008ccdb876e765aaf640" offset="0x0000" />
14341434         </dataarea>
14351435      </part>
1436   </software>   
1437   
1436   </software>
1437
14381438   <software name="rr">
14391439      <description>Retro Replay v3.8P</description>
14401440      <year>2006</year>
r14559r14560
14481448            <rom name="rr38ppal.bin" size="0x10000" crc="fa52afac" sha1="48381d924a20978319ead8de7c904c91f270cc65" offset="0x0000" />
14491449         </dataarea>
14501450      </part>
1451   </software>   
1452   
1451   </software>
1452
14531453   <software name="exos">
14541454      <description>ExOS v.3</description>
14551455      <year>198?</year>
r14559r14560
14631463            <rom name="exos_v3.bin" size="0x2000" crc="4e54d020" sha1="f8931b7c0b26807f4de0cc241f0b1e2c8f5271e9" offset="0x0000" />
14641464         </dataarea>
14651465      </part>
1466   </software>   
1467   
1466   </software>
1467
14681468   <software name="exosv4" cloneof="exos">
14691469      <description>ExOS v.4</description>
14701470      <year>198?</year>
r14559r14560
14781478         </dataarea>
14791479      </part>
14801480   </software>
1481   
1481
14821482   <!-- Games Added by k1w1 -->
14831483
14841484   <software name="advcrtor">
r14559r14560
51355135         </dataarea>
51365136      </part>
51375137   </software>
5138   
5138
51395139   <software name="subasram">
51405140      <description>Super Basic Ram</description>
51415141      <year>1983</year>
r14559r14560
53505350         </dataarea>
53515351      </part>
53525352   </software>
5353   
5353
53545354   <software name="ar3">
53555355      <description>Action Replay MK3 (v1)</description>
53565356      <year>1987</year>
r14559r14560
53955395         </dataarea>
53965396      </part>
53975397   </software>
5398   
5398
53995399   <software name="niki" cloneof="ar3">
54005400      <description>Niki Cartridge Fast-Disktool</description>
54015401      <year>1987</year>
r14559r14560
54105410         </dataarea>
54115411      </part>
54125412   </software>
5413   
5413
54145414   <software name="ar4">
54155415      <description>Action Replay MK4</description>
54165416      <year>1988</year>
r14559r14560
54255425         </dataarea>
54265426      </part>
54275427   </software>
5428   
5428
54295429   <software name="cmiky2" cloneof="ar4">
54305430      <description>Captain Miky II</description>
54315431      <year>1988</year>
r14559r14560
54405440         </dataarea>
54415441      </part>
54425442   </software>
5443   
5443
54445444   <software name="cmiky2a" cloneof="ar4">
54455445      <description>Captain Miky II (Alt)</description>
54465446      <year>1988</year>
r14559r14560
54555455         </dataarea>
54565456      </part>
54575457   </software>
5458   
5458
54595459   <software name="ar41">
54605460      <description>Action Replay v4.1</description>
54615461      <year>1988</year>
r14559r14560
54705470         </dataarea>
54715471      </part>
54725472   </software>
5473   
5473
54745474   <software name="ar42" cloneof="ar41">
54755475      <description>Action Replay v4.2 (v1)</description>
54765476      <year>1988</year>
r14559r14560
54855485         </dataarea>
54865486      </part>
54875487   </software>
5488   
5488
54895489   <software name="ar42v2" cloneof="ar41">
54905490      <description>Action Replay v4.2 (v2)</description>
54915491      <year>1988</year>
r14559r14560
55005500         </dataarea>
55015501      </part>
55025502   </software>
5503   
5503
55045504   <software name="ar4250" cloneof="ar41">
55055505      <description>Action Replay v4.2 (v5.0 v1)</description>
55065506      <year>1988</year>
r14559r14560
55155515         </dataarea>
55165516      </part>
55175517   </software>
5518   
5518
55195519   <software name="ar4250v2" cloneof="ar41">
55205520      <description>Action Replay v4.2 (v5.0 v2)</description>
55215521      <year>1988</year>
r14559r14560
55305530         </dataarea>
55315531      </part>
55325532   </software>
5533   
5533
55345534   <software name="acp53" cloneof="ar41">
55355535      <description>Action Cartridge Plus 5 (Ger)</description>
55365536      <year>1988</year>
r14559r14560
55455545         </dataarea>
55465546      </part>
55475547   </software>
5548   
5548
55495549   <software name="acp6" cloneof="ar41">
55505550      <description>Action Cartridge Plus 6.0</description>
55515551      <year>1988</year>
r14559r14560
55605560         </dataarea>
55615561      </part>
55625562   </software>
5563   
5563
55645564   <software name="acp6g" cloneof="ar41">
55655565      <description>Action Cartridge Plus 6.0 (Ger)</description>
55665566      <year>1988</year>
r14559r14560
55755575         </dataarea>
55765576      </part>
55775577   </software>
5578   
5578
55795579   <software name="ar73" cloneof="ar41">
55805580      <description>Action Replay v7.3</description>
55815581      <year>1991</year>
r14559r14560
55905590         </dataarea>
55915591      </part>
55925592   </software>
5593   
5593
55945594   <software name="ar5">
55955595      <description>Action Replay v5.0</description>
55965596      <year>1988</year>
r14559r14560
56055605         </dataarea>
56065606      </part>
56075607   </software>
5608   
5608
56095609   <software name="ar5n" cloneof="ar5">
56105610      <description>Action Replay v5.0 (NTSC)</description>
56115611      <year>1988</year>
r14559r14560
56205620         </dataarea>
56215621      </part>
56225622   </software>
5623   
5623
56245624   <software name="ar51" cloneof="ar5">
56255625      <description>Action Replay v5.1a</description>
56265626      <year>1988</year>
r14559r14560
56355635         </dataarea>
56365636      </part>
56375637   </software>
5638   
5638
56395639   <software name="acp7" cloneof="ar5">
56405640      <description>Action Cartridge Plus v7.0 (Derko)</description>
56415641      <year>1991</year>
r14559r14560
56505650         </dataarea>
56515651      </part>
56525652   </software>
5653   
5653
56545654   <software name="acp7t" cloneof="ar5">
56555655      <description>Action Cartridge Plus v7.0 (Triumwyrat)</description>
56565656      <year>1990</year>
r14559r14560
56655665         </dataarea>
56665666      </part>
56675667   </software>
5668     
5668
56695669   <software name="ar75" cloneof="ar5">
56705670      <description>Action Replay v7.5</description>
56715671      <year>1989</year>
r14559r14560
56805680         </dataarea>
56815681      </part>
56825682   </software>
5683         
5683
56845684   <software name="ar84" cloneof="ar5">
56855685      <description>Action Replay v8.4</description>
56865686      <year>1990</year>
r14559r14560
56955695         </dataarea>
56965696      </part>
56975697   </software>
5698         
5698
56995699   <software name="ar5flt" cloneof="ar5">
57005700      <description>The Fairlight Cracking Cartridge</description>
57015701      <year>1990</year>
r14559r14560
57105710         </dataarea>
57115711      </part>
57125712   </software>
5713   
5713
57145714   <software name="ar6t" cloneof="ar5">
57155715      <description>Action Replay v6.0 (Triad)</description>
57165716      <year>1993</year>
r14559r14560
57255725         </dataarea>
57265726      </part>
57275727   </software>
5728   
5728
57295729   <software name="ar6">
57305730      <description>Action Replay v6.0</description>
57315731      <year>1989</year>
r14559r14560
57405740         </dataarea>
57415741      </part>
57425742   </software>
5743   
5743
57445744   <software name="comal80">
57455745      <description>COMAL 80 (Commodore)</description>
57465746      <year>1985</year>
src/mess/devices/microdrv.h
r14559r14560
6464   // device-level overrides
6565    virtual void device_config_complete();
6666   virtual void device_start();
67   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);   
67   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
6868private:
6969   devcb_resolved_write_line m_out_comms_out_func;
7070
src/mess/audio/arcadia.c
r14559r14560
126126
127127
128128//-------------------------------------------------
129//  soundport_w
129//  soundport_w
130130//-------------------------------------------------
131131
132132WRITE8_MEMBER(arcadia_sound_device::write)
src/mess/audio/arcadia.h
r14559r14560
1414
1515// ======================> arcadia_sound_device
1616
17class arcadia_sound_device : public device_t,
17class arcadia_sound_device : public device_t,
1818                      public device_sound_interface
1919{
2020public:
r14559r14560
2626   // device-level overrides
2727   virtual void device_start();
2828   virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
29   
29
3030   sound_stream *m_channel;
3131    UINT8 m_reg[3];
3232    int m_size, m_pos,m_tval,m_nval;
src/mess/machine/s100_wunderbus.c
r14559r14560
6868/*
6969static INS8250_TRANSMIT( ace1_transmit )
7070{
71   s100_wunderbus_device *wunderbus = downcast<s100_wunderbus_device *>(device->owner());
71    s100_wunderbus_device *wunderbus = downcast<s100_wunderbus_device *>(device->owner());
7272
73   wunderbus->m_s100->terminal_transmit_w(data);
73    wunderbus->m_s100->terminal_transmit_w(data);
7474}
7575*/
7676//-------------------------------------------------
r14559r14560
7979
8080void s100_wunderbus_device::s100_terminal_w(UINT8 data)
8181{
82//   ins8250_receive(m_ace1, data);
82//  ins8250_receive(m_ace1, data);
8383}
8484
8585static ins8250_interface ace1_intf =
src/mess/machine/pc1350.c
r14559r14560
131131   UINT8 *ram = machine.region("maincpu")->base() + 0x2000;
132132   UINT8 *cpu = sc61860_internal_ram(main_cpu);
133133
134   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);   
135   machine.device<nvram_device>("ram_nvram")->set_base(ram, 0x5000);   
134   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);
135   machine.device<nvram_device>("ram_nvram")->set_base(ram, 0x5000);
136136}
src/mess/machine/c64_silverrock.c
r14559r14560
99 
1010/*
1111 
12   PCB Layout
13   ----------
14   
15   e9048
16   |=============|
17   |=| LS00      |
18   |=|      LS273|
19   |=|           |
20   |=|           |
21   |=| ROM       |
22   |=|           |
23   |=|           |
24   |=|           |
25   |=============|
12    PCB Layout
13    ----------
2614 
27   ROM     - Atmel AT27C010-25PC 128Kx8 OTP EPROM "HUGO 2012"
15    e9048
16    |=============|
17    |=| LS00      |
18    |=|      LS273|
19    |=|           |
20    |=|           |
21    |=| ROM       |
22    |=|           |
23    |=|           |
24    |=|           |
25    |=============|
2826 
27    ROM     - Atmel AT27C010-25PC 128Kx8 OTP EPROM "HUGO 2012"
28 
2929*/
3030 
3131#include "c64_silverrock.h"
r14559r14560
3535//**************************************************************************
3636//  MACROS/CONSTANTS
3737//**************************************************************************
38   
38
3939#define UNSCRAMBLE_ADDRESS(_offset) \
4040   BITSWAP16(_offset,15,14,13,12,1,0,2,3,11,10,9,8,7,6,5,4)
4141 
4242#define UNSCRAMBLE_DATA(_data) \
4343   BITSWAP8(_data,7,6,5,4,0,1,2,3)
44   
45   
4644 
45 
46 
4747//**************************************************************************
4848//  DEVICE DEFINITIONS
4949//**************************************************************************
r14559r14560
9595UINT8 c64_silverrock_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
9696{
9797   UINT8 data = 0;
98   
98
9999   if (!roml)
100100   {
101101      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
r14559r14560
117117   {
118118      /*
119119 
120         bit     description
120            bit     description
121121 
122         0
123         1
124         2
125         3
126         4       A14
127         5       A15
128         6       A16
129         7       A13
122            0
123            1
124            2
125            3
126            4       A14
127            5       A15
128            6       A16
129            7       A13
130130 
131      */
131        */
132132 
133133      m_bank = ((data >> 3) & 0x0e) | BIT(data, 7);
134134   }
src/mess/machine/serial.c
r14559r14560
113113{
114114   if(m_dev)
115115      return m_dev->dtr_w(state);
116   
116
117117   if(serial_port_device::m_dev)
118118   {
119119      loopdtr = state;
r14559r14560
126126{
127127   if(m_dev)
128128      return m_dev->rts_w(state);
129   
129
130130   if(serial_port_device::m_dev)
131131   {
132132      looprts = state;
src/mess/machine/serial.h
r14559r14560
4242
4343   DECLARE_WRITE_LINE_MEMBER( tx ) { if(m_dev) m_dev->tx(state); }
4444   DECLARE_READ_LINE_MEMBER( rx )  { return (m_dev) ? m_dev->rx() : 0; }
45   
45
4646   void out_rx(UINT8 param)  { m_out_rx_func(param); }
4747protected:
4848   virtual void device_start();
src/mess/machine/at.c
r14559r14560
288288   pit8253_gate2_w(m_pit8254, BIT(data, 0));
289289   at_speaker_set_spkrdata( BIT(data, 1));
290290   m_channel_check = BIT(data, 3);
291   m_isabus->set_nmi_state((m_nmi_enabled==0) && (m_channel_check==0));   
291   m_isabus->set_nmi_state((m_nmi_enabled==0) && (m_channel_check==0));
292292}
293293
294294
src/mess/machine/cbmipt.c
r14559r14560
11451145   SLOT_INTERFACE("georam", C64_GEORAM)
11461146   SLOT_INTERFACE("xl80", C64_XL80)
11471147   SLOT_INTERFACE("easyflash", C64_EASYFLASH)
1148   
1148
11491149   // the following need ROMs from the software list
11501150   SLOT_INTERFACE("ieee488", C64_IEEE488)
11511151   SLOT_INTERFACE("standard", C64_STD)
src/mess/machine/a7800.c
r14559r14560
1717                            cart not needed when in PAL mode
1818                            added F18 Hornet bank select type
1919                            added Activision bank select type
20   19-Feb-2010 DanB       Added return values for TIA collision registers
20    19-Feb-2010 DanB        Added return values for TIA collision registers
2121***************************************************************************/
2222
2323#include "emu.h"
r14559r14560
471471      case 0x06:
472472      case 0x07:
473473      /* Even though the 7800 doesn't use the TIA graphics the collision registers should
474         still return a reasonable value */
474           still return a reasonable value */
475475         return 0x00;
476476      case 0x08:
477477           return((input_port_read(space->machine(), "buttons") & 0x02) << 6);
src/mess/machine/vic20exp.c
r14559r14560
2323
2424
2525// slot names for the VIC-20 cartridge types
26const char *CRT_VIC20_SLOT_NAMES[_CRT_VIC20_COUNT] =
26const char *CRT_VIC20_SLOT_NAMES[_CRT_VIC20_COUNT] =
2727{
2828   UNSUPPORTED,
2929   "standard",
r14559r14560
239239            // read the header
240240            cbm_crt_header header;
241241            fread(&header, CRT_HEADER_LENGTH);
242           
242
243243            if (memcmp(header.signature, CRT_SIGNATURE, 16) != 0)
244244               return IMAGE_INIT_FAIL;
245           
245
246246            UINT16 hardware = pick_integer_be(header.hardware, 0, 2);
247           
247
248248            // TODO support other cartridge hardware
249249            if (hardware != CRT_VIC20_STANDARD)
250250               return IMAGE_INIT_FAIL;
251           
251
252252            if (LOG)
253253            {
254254               logerror("Name: %s\n", header.name);
255255               logerror("Hardware: %04x\n", hardware);
256256               logerror("Slot device: %s\n", CRT_VIC20_SLOT_NAMES[hardware]);
257257            }
258         
258
259259            // determine ROM region lengths
260260            size_t blk1_size = 0;
261261            size_t blk2_size = 0;
262262            size_t blk3_size = 0;
263263            size_t blk5_size = 0;
264           
264
265265            while (!image_feof())
266266            {
267267               cbm_crt_chip chip;
268268               fread(&chip, CRT_CHIP_LENGTH);
269               
269
270270               UINT16 address = pick_integer_be(chip.start_address, 0, 2);
271271               UINT16 size = pick_integer_be(chip.image_size, 0, 2);
272272               UINT16 type = pick_integer_be(chip.chip_type, 0, 2);
273               
273
274274               if (LOG)
275275               {
276276                  logerror("CHIP Address: %04x\n", address);
277277                  logerror("CHIP Size: %04x\n", size);
278278                  logerror("CHIP Type: %04x\n", type);
279279               }
280               
280
281281               switch (address)
282282               {
283283               case 0x2000: blk1_size += size; break;
r14559r14560
288288               case 0xb000: blk5_size += 0x2000; break;
289289               default: logerror("Invalid CHIP loading address!\n"); break;
290290               }
291               
291
292292               fseek(size, SEEK_CUR);
293293            }
294294
r14559r14560
297297            UINT8 *blk2 = NULL;
298298            UINT8 *blk3 = NULL;
299299            UINT8 *blk5 = NULL;
300           
300
301301            if (blk1_size) blk1 = m_cart->vic20_blk1_pointer(machine(), blk1_size);
302302            if (blk2_size) blk2 = m_cart->vic20_blk2_pointer(machine(), blk2_size);
303303            if (blk3_size) blk3 = m_cart->vic20_blk3_pointer(machine(), blk3_size);
304304            if (blk5_size) blk5 = m_cart->vic20_blk5_pointer(machine(), blk5_size);
305           
305
306306            // read the data
307307            offs_t blk1_offset = 0;
308308            offs_t blk2_offset = 0;
309309            offs_t blk3_offset = 0;
310310            offs_t blk5_offset = 0;
311           
311
312312            fseek(CRT_HEADER_LENGTH, SEEK_SET);
313           
313
314314            while (!image_feof())
315315            {
316316               cbm_crt_chip chip;
317317               fread(&chip, CRT_CHIP_LENGTH);
318               
318
319319               UINT16 address = pick_integer_be(chip.start_address, 0, 2);
320320               UINT16 size = pick_integer_be(chip.image_size, 0, 2);
321321
src/mess/machine/c64_ocean.c
r14559r14560
6262UINT8 c64_ocean_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml)
6767   {
6868      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
src/mess/machine/c64_warp_speed.c
r14559r14560
99 
1010/*
1111 
12   PCB Layout
13   ----------
12    PCB Layout
13    ----------
1414 
15   |===================|
16   |=|             SW1 |
17   |=|                 |
18   |=|             SW2 |
19   |=|                 |
20   |=|                 |
21   |=|    ROM          |
22   |=|            LS109|
23   |=|                 |
24   |===================|
15    |===================|
16    |=|             SW1 |
17    |=|                 |
18    |=|             SW2 |
19    |=|                 |
20    |=|                 |
21    |=|    ROM          |
22    |=|            LS109|
23    |=|                 |
24    |===================|
2525 
26   ROM     - "DEI-356NR-WRPIIDA1 (C) NCR A8847 609-2415038 F833071" 16Kx8 ROM
27   SW1     - mode switch (C64/C128)
28   SW2     - reset button
26    ROM     - "DEI-356NR-WRPIIDA1 (C) NCR A8847 609-2415038 F833071" 16Kx8 ROM
27    SW1     - mode switch (C64/C128)
28    SW2     - reset button
2929 
3030*/
3131 
r14559r14560
3636//**************************************************************************
3737//  MACROS/CONSTANTS
3838//**************************************************************************
39   
39
4040#define UNSCRAMBLE_ADDRESS(_offset) \
4141   BITSWAP16(_offset,15,14,12,13,5,2,7,9,11,10,8,6,4,3,1,0)
4242 
4343#define UNSCRAMBLE_DATA(_data) \
4444   BITSWAP8(_data,7,6,5,0,1,4,2,3)
45   
46   
4745 
46 
47 
4848//**************************************************************************
4949//  DEVICE DEFINITIONS
5050//**************************************************************************
r14559r14560
125125UINT8 c64_warp_speed_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
126126{
127127   UINT8 data = 0;
128   
128
129129   if (!roml || !romh || !io1 || !io2)
130130   {
131131      offs_t addr = UNSCRAMBLE_ADDRESS(offset & 0x3fff);
src/mess/machine/c64_ocean.h
r14559r14560
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43   
43
4444private:
4545   UINT8 m_bank;
4646};
src/mess/machine/c64_warp_speed.h
r14559r14560
3434 
3535   // optional information overrides
3636   virtual ioport_constructor device_input_ports() const;
37   
37
3838   static INPUT_CHANGED( reset );
3939 
4040protected:
src/mess/machine/c64_system3.c
r14559r14560
6262UINT8 c64_system3_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml)
6767   {
6868      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
src/mess/machine/c64_system3.h
r14559r14560
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43   
43
4444private:
4545   UINT8 m_bank;
4646};
src/mess/machine/c64_fun_play.c
r14559r14560
6262UINT8 c64_fun_play_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml)
6767   {
6868      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
r14559r14560
8383   {
8484      /*
8585 
86         bit     description
86            bit     description
8787 
88         0      A16
89         1
90         2
91         3      A13
92         4       A14
93         5       A15
94         6       
95         7       
88            0       A16
89            1
90            2
91            3       A13
92            4       A14
93            5       A15
94            6
95            7
9696 
97      */
98       
97        */
98 
9999      m_bank = ((data & 0x01) << 3) | ((data >> 3) & 0x07);
100100   }
101101}
src/mess/machine/c64_exos.c
r14559r14560
5050UINT8 c64_exos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
5151{
5252   UINT8 data = 0;
53   
53
5454   if (!romh)
5555   {
5656      data = m_romh[offset & 0x1fff];
src/mess/machine/c64_fun_play.h
r14559r14560
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43   
43
4444private:
4545   UINT8 m_bank;
4646};
src/mess/machine/c64_pagefox.c
r14559r14560
99 
1010/*
1111 
12   PCB Layout
13   ----------
12    PCB Layout
13    ----------
1414 
15   |===========================|
16   |=|                         |
17   |=|     RAM         LS11    |
18   |=|                         |
19   |=|                 LS139   |
20   |=|     ROM0                |
21   |=|                 LS273   |
22   |=|                         |
23   |=|     ROM1        LS00    |
24   |===========================|
15    |===========================|
16    |=|                         |
17    |=|     RAM         LS11    |
18    |=|                         |
19    |=|                 LS139   |
20    |=|     ROM0                |
21    |=|                 LS273   |
22    |=|                         |
23    |=|     ROM1        LS00    |
24    |===========================|
2525 
26   RAM   - NEC D43256-12L 32Kx8 RAM
27   ROM0  - SGS M27256-2FI 32Kx8 EPROM
28   ROM1  - National Instruments NMC27C256Q 32Kx8 EPROM
26    RAM   - NEC D43256-12L 32Kx8 RAM
27    ROM0  - SGS M27256-2FI 32Kx8 EPROM
28    ROM1  - National Instruments NMC27C256Q 32Kx8 EPROM
2929 
3030*/
3131 
r14559r14560
8484UINT8 c64_pagefox_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
8585{
8686   UINT8 data = 0;
87   
87
8888   if (!roml || !romh)
8989   {
9090      if (BIT(m_bank, 3))
r14559r14560
130130         m_game = 0;
131131         m_exrom = 0;
132132      }
133     
133
134134      m_bank = data;
135135   }
136136}
src/mess/machine/wswan.c
r14559r14560
202202   if ( state->m_rtc.present )
203203      machine.scheduler().timer_pulse(attotime::from_seconds(1), FUNC(wswan_rtc_callback));
204204
205   machine.device<nvram_device>("nvram")->set_base(state->m_internal_eeprom, INTERNAL_EEPROM_SIZE);     
205   machine.device<nvram_device>("nvram")->set_base(state->m_internal_eeprom, INTERNAL_EEPROM_SIZE);
206206}
207207
208208MACHINE_START( wscolor )
r14559r14560
220220   if ( state->m_rtc.present )
221221      machine.scheduler().timer_pulse(attotime::from_seconds(1), FUNC(wswan_rtc_callback));
222222
223   machine.device<nvram_device>("nvram")->set_base(state->m_internal_eeprom, INTERNAL_EEPROM_SIZE);     
223   machine.device<nvram_device>("nvram")->set_base(state->m_internal_eeprom, INTERNAL_EEPROM_SIZE);
224224}
225225
226226MACHINE_RESET( wswan )
r14559r14560
240240   state->m_vdp.color_mode = 0;
241241   state->m_vdp.colors_16 = 0;
242242   state->m_vdp.tile_packed = 0;
243   
243
244244   render_target *target = machine.render().first_target();
245245   target->set_view(state->m_rotate);
246246
r14559r14560
14811481      state->m_vdp.sprite_count = state->m_ws_portram[0x06];
14821482      state->m_vdp.sprite_first = state->m_ws_portram[0x05]; // always zero?
14831483   }
1484   
1484
14851485   if( state->m_vdp.current_line == 144 )
14861486   {
14871487      wswan_set_irq_line( machine, WSWAN_IFLAG_VBL );
src/mess/machine/apollo_kbd.c
r14559r14560
404404   else
405405   {
406406      m_tx_pending = 0;
407//      m_timer->adjust(attotime::never, 0);
407//      m_timer->adjust(attotime::never, 0);
408408   }
409409}
410410
r14559r14560
890890        /* C9      I           */ 0x34, 0xB4, 0x69,     0x49,   0x09,   0x49,     NOP,     No,
891891        /* C10     O           */ 0x35, 0xB5, 0x6F,     0x4F,   0x0F,   0x4F,     NOP,     No,
892892        /* C11     P           */ 0x36, 0xB6, 0x70,     0x50,   0x10,   0x50,     NOP,     No,
893        /* C12     { [ / Ü     */ 0x37, 0xB7, 0x7B,     0x5B,   0x1B,   0x7B,     NOP,     No,
894        /* C13     } ] / Ö     */ 0x38, 0xB8, 0x7D,     0x5D,   0x1D,   0x7D,     NOP,     No,
893        /* C12     { [ / ?     */ 0x37, 0xB7, 0x7B,     0x5B,   0x1B,   0x7B,     NOP,     No,
894        /* C13     } ] / ?     */ 0x38, 0xB8, 0x7D,     0x5D,   0x1D,   0x7D,     NOP,     No,
895895        /* D13     RETURN      */ 0x52, 0xD2, 0xCB,     0xDB,   NOP,    0xCB,     NOP,     No,
896896
897897        /* D2      A           */ 0x46, 0xC6, 0x61,     0x41,   0x01,   0x41,     NOP,     No,
r14559r14560
904904        /* D9      K           */ 0x4D, 0xCD, 0x6B,     0x4B,   0x0B,   0x4B,     NOP,     No,
905905        /* D10     L           */ 0x4E, 0xCE, 0x6C,     0x4C,   0x0C,   0x4C,     NOP,     No,
906906        /* D11     : ;         */ 0x4F, 0xCF, 0x3B,     0x3A,   0xFB,   0x3B,     NOP,     No,
907        /* D12     " ' / Ä     */ 0x50, 0xD0, 0x27,     0x22,   0xF8,   0x27,     NOP,     No,
907        /* D12     " ' / ?     */ 0x50, 0xD0, 0x27,     0x22,   0xF8,   0x27,     NOP,     No,
908908        /* D14     ! \         */ 0x53, 0xD3, 0xC8,     0xC9,   NOP,    0xC8,     NOP,     No,
909909
910910        /* E2      Z           */ 0x60, 0xE0, 0x7A,     0x5A,   0x1A,   0x5A,     NOP,     No,
r14559r14560
11141114   PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("Cursor Up")  PORT_CODE(KEYCODE_UP) /* Up */
11151115   PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("Cursor Right")  PORT_CODE(KEYCODE_RIGHT) /* Right */
11161116   PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("Cursor Down")  PORT_CODE(KEYCODE_DOWN) /* Down */
1117//   PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("Numpad CLR")  PORT_CODE(KEYCODE_NUMLOCK) /* CLR */
1117//  PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("Numpad CLR")  PORT_CODE(KEYCODE_NUMLOCK) /* CLR */
11181118   PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("MENU")  PORT_CODE(KEYCODE_MENU) /* Menu = POP */
11191119
11201120   PORT_START( "keyboard3" )
r14559r14560
11501150   PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("F11") PORT_CODE(KEYCODE_F11) /* F11 */
11511151   PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("F12") PORT_CODE(KEYCODE_F12) /* F12 */
11521152   PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("Insert") PORT_CODE(KEYCODE_INSERT) /* Insert */
1153//   PORT_BIT( 0x80000000, 0x0000, IPT_UNUSED )
1153//  PORT_BIT( 0x80000000, 0x0000, IPT_UNUSED )
11541154   PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_KEYBOARD )  PORT_NAME("WIN_R")  PORT_CODE(KEYCODE_RWIN) /* Windows Right = Next Window */
11551155
11561156   PORT_START( "keyboard4" )
src/mess/machine/c64_mach5.c
r14559r14560
88**********************************************************************/
99 
1010#include "c64_mach5.h"
11   
12   
1311 
12 
13 
1414//**************************************************************************
1515//  DEVICE DEFINITIONS
1616//**************************************************************************
r14559r14560
6060UINT8 c64_mach5_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6161{
6262   UINT8 data = 0;
63   
63
6464   if (!roml || !io1 || !io2)
6565   {
6666      data = m_roml[offset & 0x1fff];
src/mess/machine/apollo_kbd.h
r14559r14560
162162      int m_connected;
163163   };
164164
165//   const apollo_kbd_interface &m_config;
165//  const apollo_kbd_interface &m_config;
166166
167167   beeper   m_beeper;
168168   mouse   m_mouse;
src/mess/machine/apple2gs.c
r14559r14560
18501850   state->m_sndglu_dummy_read = 0;
18511851
18521852   state->m_is_rom3 = true;
1853   
1853
18541854   machine.device<nvram_device>("nvram")->set_base(state->m_clock_bram, sizeof(state->m_clock_bram));
18551855
18561856   /* save state stuff.  note that the driver takes care of docram. */
src/mess/machine/c64_simons_basic.c
r14559r14560
6969   {
7070      data = m_romh[offset & 0x1fff];
7171   }
72   
72
7373   return data;
7474}
7575 
src/mess/machine/apollo.c
r14559r14560
253253   else if ((data & APOLLO_CSR_CR_FPU_TRAP_ENABLE) == 0)
254254   {
255255      // enable FPU (i.e. FPU opcodes in CPU)
256//      apollo_set_cpu_has_fpu(&space->device(), 1);
256//      apollo_set_cpu_has_fpu(&space->device(), 1);
257257   }
258258   else
259259   {
260260      // disable FPU (i.e. FPU opcodes in CPU)
261//      apollo_set_cpu_has_fpu(&space->device(), 0);
261//      apollo_set_cpu_has_fpu(&space->device(), 0);
262262
263263      if (!apollo_is_dn3000())
264264      {
r14559r14560
497497
498498static READ8_DEVICE_HANDLER( apollo_dma8237_fdc_dack_r ) {
499499   UINT8 data = pc_fdc_dack_r(device->machine());
500   //   DLOG2(("dma fdc dack read %02x",data));
500   //  DLOG2(("dma fdc dack read %02x",data));
501501
502502   // hack for DN3000: select appropriate DMA channel No.
503503   dn3000_dma_channel1 = 2; // 1 = ctape, 2 = floppy dma channel
r14559r14560
522522
523523static WRITE8_DEVICE_HANDLER( apollo_dma8237_wdc_dack_w ) {
524524   DLOG1(("dma wdc dack write %02x (not used, not emulated!)", data));
525//   omti8621_dack_w(device->machine, data);
525//  omti8621_dack_w(device->machine, data);
526526}
527527
528528static WRITE_LINE_DEVICE_HANDLER( apollo_dma8237_out_eop ) {
r14559r14560
734734static WRITE_LINE_DEVICE_HANDLER( apollo_ptm_irq_function ) {
735735   DLOG1(("apollo_ptm_irq_function: state=%d", state ));
736736
737//   ptm6840_device *ptm = device->machine().device<ptm6840_device>(APOLLO_PTM_TAG);
737//  ptm6840_device *ptm = device->machine().device<ptm6840_device>(APOLLO_PTM_TAG);
738738
739739   apollo_pic_set_irq_line(device, APOLLO_IRQ_PTM, state);
740740}
741741
742//   Timer 1's input is a 250-kHz (4-microsecond period) signal.
743//   Timer 2's input is a 125-kHz (8-microsecond period) signal.
744//   Timer 3's input is a 62.5-kHz (16-microsecond period) signal.
745//   The Timer 3 input may be prescaled to make the effective input signal have a 128-microsecond period.
742//  Timer 1's input is a 250-kHz (4-microsecond period) signal.
743//  Timer 2's input is a 125-kHz (8-microsecond period) signal.
744//  Timer 3's input is a 62.5-kHz (16-microsecond period) signal.
745//  The Timer 3 input may be prescaled to make the effective input signal have a 128-microsecond period.
746746
747747static const ptm6840_interface apollo_ptm_config = {
748748      0,
r14559r14560
10951095#endif
10961096
10971097   // The counter/timer on the SIO chip is used for the refresh count.
1098   // This is set up in the timer mode to   produce a square wave output on output OP3.
1098   // This is set up in the timer mode to  produce a square wave output on output OP3.
10991099   // The period of the output is 15 microseconds.
11001100
11011101   // toggle memory refresh counter
r14559r14560
13051305
13061306   // hack to make upd765.c work again for apollo with MESS version >= 0.142u6
13071307   // 2011-07-23 Hans Ostermyer
1308//   extern void upd765_hack_for_apollo();
1309//   upd765_hack_for_apollo();
1308//  extern void upd765_hack_for_apollo();
1309//  upd765_hack_for_apollo();
13101310}
13111311
13121312WRITE8_HANDLER(apollo_fdc_w ) {
r14559r14560
13711371 ***************************************************************************/
13721372
13731373static void apollo_wdc_set_irq(const running_machine *machine, int state) {
1374//   FIXME:
1375//   MLOG2(("apollo_wdc_set_irq: state=%x", state ));
1374//  FIXME:
1375//  MLOG2(("apollo_wdc_set_irq: state=%x", state ));
13761376   apollo_pic_set_irq_line(machine->firstcpu, APOLLO_IRQ_WIN1, state);
13771377}
13781378
src/mess/machine/3c505.c
r14559r14560
525525      switch (m_command_buffer[0])
526526      {
527527      case CMD_MC_F9: // 0xf9
528//         logerror(" (%02x, length=00)", m_command_buffer[0]);
528//          logerror(" (%02x, length=00)", m_command_buffer[0]);
529529         break;
530530
531531      default:
r14559r14560
686686      m_i82586_config = m_program_buffer.get_word(1);
687687      break;
688688
689//   case CMD_MC_F8:
689//  case CMD_MC_F8:
690690   case CMD_RECEIVE_PACKET: // 0x08
691691      if (m_rx_data_buffer.get_length() == 0 && !m_rx_fifo.get(&m_rx_data_buffer))
692692      {
r14559r14560
700700      return;
701701      // break;
702702
703//      case CMD_MC_F8:
703//      case CMD_MC_F8:
704704      case CMD_MC_F9:
705//      case CMD_MC_FA:
705//      case CMD_MC_FA:
706706      // FIXME:
707707      m_response.command = CMD_TRANSMIT_PACKET_COMPLETE;
708//      break;
708//      break;
709709
710710   case CMD_TRANSMIT_PACKET: // 0x09
711711   case CMD_TRANSMIT_PACKET_18: // 0x18
r14559r14560
833833      // skip packet
834834      return 0;
835835   }
836//   else if (m_command_pending && m_command_buffer[0] == CMD_MC_F9)
837//   {
838//      LOG(("threecom3c505_receive: data_length=%x !!!! skipped data while CMD_MC_F9 is pending!", length));
839//      return 0;
840//   }
836//  else if (m_command_pending && m_command_buffer[0] == CMD_MC_F9)
837//  {
838//      LOG(("threecom3c505_receive: data_length=%x !!!! skipped data while CMD_MC_F9 is pending!", length));
839//      return 0;
840//  }
841841   else if (!m_rx_fifo.put(data, length))
842842   {
843843      // fifo overrun
r14559r14560
853853         m_rx_fifo.get(&m_rx_data_buffer);
854854      }
855855
856//      if (m_command_pending && m_command_buffer[0] == CMD_MC_F9)
857//      {
858//         verbose = 2;
859//      }
856//      if (m_command_pending && m_command_buffer[0] == CMD_MC_F9)
857//      {
858//          verbose = 2;
859//      }
860860
861861      if (!m_command_pending && m_rx_pending > 0
862862            && m_rx_data_buffer.get_length() > 0)
r14559r14560
866866         do_receive_command();
867867      }
868868
869//      guessing!
870//      else if (m_control & CMDE)
871//      {
872//         m_status |= ACRF; /* adapter command register full */
869//      guessing!
870//      else if (m_control & CMDE)
871//      {
872//          m_status |= ACRF; /* adapter command register full */
873873//
874//         LOG(("threecom3c505_receive - set_interrupt(%d)",ASSERT_LINE));
875//         set_interrupt(ASSERT_LINE);
876//      }
874//          LOG(("threecom3c505_receive - set_interrupt(%d)",ASSERT_LINE));
875//          set_interrupt(ASSERT_LINE);
876//      }
877877
878878      return 1;
879879   }
r14559r14560
896896            // spurious data; set command register empty
897897            m_command_index = 0;
898898            m_status |= HCRE;
899//            verbose = 2;
899//              verbose = 2;
900900            break;
901901
902902         case CMD_MC_F9:
903//         case CMD_MC_FA:
903//          case CMD_MC_FA:
904904            // read data length from data port (not from command port)
905905            m_tx_data_buffer.reset();
906906            m_status |= HRDY; /* data register ready */
r14559r14560
955955   UINT8 data;
956956   if (m_response_index == 0)
957957   {
958//      set_command_pending(1);
958//      set_command_pending(1);
959959      data = m_response.command;
960960   }
961961   else if (m_response_index == 1)
r14559r14560
12581258         else
12591259         {
12601260            // flush data register (reset tx data fifo)
1261//            m_tx_data_length = 0;
1261//              m_tx_data_length = 0;
12621262            m_tx_data_buffer.reset();
12631263            m_status |= HRDY; /* data register ready */
12641264         }
src/mess/machine/c64_westermann.c
r14559r14560
6060UINT8 c64_westermann_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6161{
6262   UINT8 data = 0;
63   
63
6464   if (!roml || !romh)
6565   {
6666      data = m_roml[offset & 0x3fff];
src/mess/machine/c64_vw64.c
r14559r14560
99 
1010/*
1111 
12   PCB Layout
13   ----------
12    PCB Layout
13    ----------
1414 
15   |===========================|
16   |=|      LS10    LS122  C   |
17   |=|                  R      |
18   |=|                         |
19   |=|                         |
20   |=|      ROM0  ROM2  ROM1   |
21   |=|                         |
22   |=|                         |
23   |=|                         |
24   |===========================|
15    |===========================|
16    |=|      LS10    LS122  C   |
17    |=|                  R      |
18    |=|                         |
19    |=|                         |
20    |=|      ROM0  ROM2  ROM1   |
21    |=|                         |
22    |=|                         |
23    |=|                         |
24    |===========================|
2525 
26   ROM0    - Mitsubishi M5L2764K 8Kx8 EPROM "U"
27   ROM1    - Mitsubishi M5L2764K 8Kx8 EPROM "3"
28   ROM2    - Mitsubishi M5L2764K 8Kx8 EPROM "2" (located on solder side)
29   R       - 56K
30   C       - 47uF
26    ROM0    - Mitsubishi M5L2764K 8Kx8 EPROM "U"
27    ROM1    - Mitsubishi M5L2764K 8Kx8 EPROM "3"
28    ROM2    - Mitsubishi M5L2764K 8Kx8 EPROM "2" (located on solder side)
29    R       - 56K
30    C       - 47uF
3131 
3232*/
3333 
r14559r14560
4545#define UNSCRAMBLE_DATA(_data) \
4646   BITSWAP8(_data,7,6,0,5,1,4,2,3)
4747 
48   
48
4949// 74LS122 tW=0.45*R*C = 1.1844s
50#define TIMER_PERIOD   1184   
50#define TIMER_PERIOD   1184
5151 
5252 
5353 
r14559r14560
9292void c64_vizawrite_cartridge_device::device_reset()
9393{
9494   m_game = 0;
95   
9695 
96 
9797   m_game_timer->adjust(attotime::from_msec(TIMER_PERIOD), 0);
9898}
9999 
r14559r14560
126126      offs_t addr = offset & 0x1fff;
127127      data = UNSCRAMBLE_DATA(m_romh[UNSCRAMBLE_ADDRESS(addr)]);
128128   }
129   
129
130130   return data;
131131}
src/mess/machine/c64_vw64.h
r14559r14560
4141   // device_c64_expansion_card_interface overrides
4242   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4343   virtual int c64_exrom_r() { return 0; }
44   
44
4545private:
4646   emu_timer *m_game_timer;
4747};
src/mess/machine/sc499.c
r14559r14560
201201
202202   if (m_image->image_core_file() == NULL)
203203   {
204       LOG2(("start sc499: no cartridge tape"));
204      LOG2(("start sc499: no cartridge tape"));
205205   }
206206   else
207207   {
208       LOG2(("start sc499: cartridge tape image is %s",m_image->filename()));
208      LOG2(("start sc499: cartridge tape image is %s",m_image->filename()));
209209   }
210210
211211   m_ctape_block_buffer = auto_alloc_array(machine(), UINT8, SC499_CTAPE_BLOCK_SIZE);
r14559r14560
334334      m_image_length = 0;
335335      m_ctape_block_count = 0;
336336
337       LOG1(("check_tape: no cartridge tape"));
337      LOG1(("check_tape: no cartridge tape"));
338338   }
339339}
340340
r14559r14560
768768         }
769769         else if (m_command == SC499_CMD_READ_STATUS)
770770         {
771//            if (m_data_index > 0)
771//              if (m_data_index > 0)
772772            {
773773               m_timer->adjust( attotime::from_usec(20), SC499_TIMER_4);
774774            }
r14559r14560
812812      m_timer->adjust( attotime::from_msec(1), SC499_TIMER_3);
813813
814814// Note: proper sequence is:
815//      pc=3c4ad714 - ctape: write_dma_go: 00
816//      pc=3c4ad718 - ctape: write_control_port: 30
817//      pc=3c40ebda: apollo_dma_1_w: writing DMA Controller 1 at offset 02 = 00
818//      pc=3c40ebe8: apollo_dma_1_w: writing DMA Controller 1 at offset 02 = 22
819//      pc=3c40ebf4: apollo_dma_1_w: writing DMA Controller 1 at offset 0c = 00
820//      pc=3c40ec04: apollo_dma_1_w: writing DMA Controller 1 at offset 03 = ff
821//      pc=3c40ec12: apollo_dma_1_w: writing DMA Controller 1 at offset 03 = 01
822//      pc=3c40ec1e: apollo_dma_1_w: writing DMA Controller 1 at offset 0b = 45
823//      pc=3c40ec2e: apollo_dma_1_w: writing DMA Controller 1 at offset 0a = 01
824//      pc=3c41a154 - ctape: timer_func param=3 status=2f
825//      pc=3c41a154 - ctape: set_dma_drq(1)
826//      pc=3c41a154 - maincpu: apollo_dma_ctape_drq: state=1
827//      pc=3c41a154 - ctape: dack_read: data[0]=55 status=6f
828//      pc=3c41a154: dma write byte at offset 17f9c00+200 = 55
829//      pc=3c41a154: dma write byte at offset 17f9c00+2ff = 6d
830//      pc=3c41a154: dma write byte at offset 17f9c00+300 = 65
831//      pc=3c41a154 - ctape: dack_read: data[511]=60 status=6f
832//      pc=3c41a154: dma write byte at offset 17f9c00+3ff = 60
833//      pc=3c41a154 - dma8237_1: dma out eop state 00
834//      pc=3c41a154 - ctape: set_tc_state: block=21 state=0
835//      pc=3c41a154 - ctape: set_dma_drq(0)
836//      pc=3c41a154 - maincpu: apollo_dma_ctape_drq: state=0
837//      pc=3c41a154 - dma8237_1: dma out eop state 01
838//      pc=3c41a154 - ctape: set_tc_state: block=21 state=1
815//      pc=3c4ad714 - ctape: write_dma_go: 00
816//      pc=3c4ad718 - ctape: write_control_port: 30
817//      pc=3c40ebda: apollo_dma_1_w: writing DMA Controller 1 at offset 02 = 00
818//      pc=3c40ebe8: apollo_dma_1_w: writing DMA Controller 1 at offset 02 = 22
819//      pc=3c40ebf4: apollo_dma_1_w: writing DMA Controller 1 at offset 0c = 00
820//      pc=3c40ec04: apollo_dma_1_w: writing DMA Controller 1 at offset 03 = ff
821//      pc=3c40ec12: apollo_dma_1_w: writing DMA Controller 1 at offset 03 = 01
822//      pc=3c40ec1e: apollo_dma_1_w: writing DMA Controller 1 at offset 0b = 45
823//      pc=3c40ec2e: apollo_dma_1_w: writing DMA Controller 1 at offset 0a = 01
824//      pc=3c41a154 - ctape: timer_func param=3 status=2f
825//      pc=3c41a154 - ctape: set_dma_drq(1)
826//      pc=3c41a154 - maincpu: apollo_dma_ctape_drq: state=1
827//      pc=3c41a154 - ctape: dack_read: data[0]=55 status=6f
828//      pc=3c41a154: dma write byte at offset 17f9c00+200 = 55
829//      pc=3c41a154: dma write byte at offset 17f9c00+2ff = 6d
830//      pc=3c41a154: dma write byte at offset 17f9c00+300 = 65
831//      pc=3c41a154 - ctape: dack_read: data[511]=60 status=6f
832//      pc=3c41a154: dma write byte at offset 17f9c00+3ff = 60
833//      pc=3c41a154 - dma8237_1: dma out eop state 00
834//      pc=3c41a154 - ctape: set_tc_state: block=21 state=0
835//      pc=3c41a154 - ctape: set_dma_drq(0)
836//      pc=3c41a154 - maincpu: apollo_dma_ctape_drq: state=0
837//      pc=3c41a154 - dma8237_1: dma out eop state 01
838//      pc=3c41a154 - ctape: set_tc_state: block=21 state=1
839839
840840      break;
841841   }
r14559r14560
885885      break;
886886   case SC499_PORT_STATUS: // read status
887887      data=read_status_port();
888//      set_interrupt(CLEAR_LINE);
888//      set_interrupt(CLEAR_LINE);
889889      break;
890890   default:
891891      LOG(("reading sc499 Register at offset %02x = %02x", offset, data));
r14559r14560
924924UINT8 sc499_device::dack_read() {
925925   UINT8 data = 0xff;
926926
927//   set_dma_drq(CLEAR_LINE);
927//  set_dma_drq(CLEAR_LINE);
928928
929929   if (m_ctape_block_index >= SC499_CTAPE_BLOCK_SIZE)
930930   {
r14559r14560
946946      LOG2(("dack_read: data[%d]=%x status=%x",  m_ctape_block_index-1, data, m_status));
947947   }
948948
949//   if (m_ctape_block_index < SC499_CTAPE_BLOCK_SIZE)
950//   {
951//      set_dma_drq(ASSERT_LINE);
952//   }
949//  if (m_ctape_block_index < SC499_CTAPE_BLOCK_SIZE)
950//  {
951//      set_dma_drq(ASSERT_LINE);
952//  }
953953
954954   return data;
955955}
r14559r14560
10231023   {
10241024      m_image->fread(m_ctape_block_buffer, SC499_CTAPE_BLOCK_SIZE);
10251025
1026      //   if (verbose > 1 || m_tape_pos % 100 == 0)
1026      //  if (verbose > 1 || m_tape_pos % 100 == 0)
10271027      {
10281028         log_block("read_block");
10291029      }
r14559r14560
10551055         tape_status_clear(SC499_ST0_FM);
10561056      }
10571057   }
1058   //   if (m_tape_pos == 69400) verbose = 2;
1058   //  if (m_tape_pos == 69400) verbose = 2;
10591059}
10601060
10611061/*-------------------------------------------------
src/mess/machine/c64_ieee488.c
r14559r14560
3636 
3737        bit     description
3838 
39        PA0     
39        PA0
4040        PA1
41        PA2      REN
42        PA3      ATN
43        PA4      DAV
44        PA5      EOI
45        PA6      NDAC
46        PA7      NRFD
41        PA2     REN
42        PA3     ATN
43        PA4     DAV
44        PA5     EOI
45        PA6     NDAC
46        PA7     NRFD
4747 
4848    */
4949 
5050   UINT8 data = 0;
51   
51
5252   data |= m_bus->ren_r() << 2;
5353   data |= m_bus->atn_r() << 3;
5454   data |= m_bus->dav_r() << 4;
r14559r14560
6565 
6666        bit     description
6767 
68        PA0      U4 DC
69        PA1      U4/U5 TE
70        PA2      REN
71        PA3      ATN
72        PA4      DAV
73        PA5      EOI
74        PA6      NDAC
75        PA7      NRFD
68        PA0     U4 DC
69        PA1     U4/U5 TE
70        PA2     REN
71        PA3     ATN
72        PA4     DAV
73        PA5     EOI
74        PA6     NDAC
75        PA7     NRFD
7676 
7777    */
78   
78
7979   m_bus->ren_w(BIT(data, 2));
8080   m_bus->atn_w(BIT(data, 3));
8181   m_bus->dav_w(BIT(data, 4));
r14559r14560
9090 
9191        bit     description
9292 
93        PC0      IFC
94        PC1      SRQ
93        PC0     IFC
94        PC1     SRQ
9595        PC2
9696        PC3
9797        PC4
9898        PC5
9999        PC6
100        PC7      slot _EXROM
100        PC7     slot _EXROM
101101 
102102    */
103103 
104104   UINT8 data = 0;
105   
105
106106   data |= m_bus->ifc_r();
107107   data |= m_bus->srq_r() << 1;
108   
108
109109   data |= m_exp->exrom_r() << 7;
110110 
111111   return data;
r14559r14560
117117 
118118        bit     description
119119 
120        PC0      IFC
121        PC1      SRQ
120        PC0     IFC
121        PC1     SRQ
122122        PC2
123        PC3      C64 _EXROM
124        PC4      _ROML select
123        PC3     C64 _EXROM
124        PC4     _ROML select
125125        PC5
126126        PC6
127127        PC7
r14559r14560
130130 
131131   m_bus->ifc_w(BIT(data, 0));
132132   m_bus->srq_w(BIT(data, 1));
133   
133
134134   m_exrom = !BIT(data, 3);
135   
135
136136   m_roml_sel = BIT(data, 4);
137137}
138138 
r14559r14560
268268UINT8 c64_ieee488_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
269269{
270270   UINT8 data = m_exp->cd_r(space, offset, roml, romh, io1, io2);
271   
271
272272   if (!roml)
273273   {
274274      if (m_roml_sel)
r14559r14560
295295   {
296296      tpi6525_w(m_tpi, offset & 0x07, data);
297297   }
298   
298
299299   m_exp->cd_w(space, offset, data, roml, romh, io1, io2);
300300}
301301 
src/mess/machine/hec2hrp.c
r14559r14560
2929                => Note that actually the DISK II boot (loading CPM : OK) but do not run (don't run the CPM...).
3030        20/11/2010 : synchronization between uPD765 and Z80 are now OK, CP/M runnig! JJStacino
3131        11/11/2011 : add the minidisque support -3 pouces 1/2 driver-  JJStacino  (jj.stac @ aliceadsl.fr)
32      19/02/2012 : few adjustment for the hrp and hr machine - JJStacino
33     
32        19/02/2012 : few adjustment for the hrp and hr machine - JJStacino
33
3434    don't forget to keep some information about these machines, see DChector project : http://dchector.free.fr/ made by DanielCoulom
3535        (and thank's to Daniel!) and Yves site : http://hectorvictor.free.fr/ (thank's too Yves!)
3636
r14559r14560
7272/* Helper function*/
7373static int isHectorWithDisc2(running_machine &machine)
7474{
75return ((strncmp(machine.system().name , "hec2hrx"    , 7)==0) ||
75return ((strncmp(machine.system().name , "hec2hrx"   , 7)==0) ||
7676      (strncmp(machine.system().name , "hec2mx40"   , 8)==0) ||
7777      (strncmp(machine.system().name , "hec2mx80"   , 8)==0));
7878}
r14559r14560
385385      /* Bit 6 => motor ON/OFF => for cassette state!*/
386386      if (state->m_write_cassette==0)
387387      {
388             cassette_device_image(space->machine())->change_state(
388            cassette_device_image(space->machine())->change_state(
389389                  CASSETTE_MOTOR_ENABLED ,
390390                  CASSETTE_MASK_MOTOR);
391391         // cassette_device_image(space->machine())->set_state((cassette_state)(CASSETTE_PLAY | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED ));
r14559r14560
408408         state->m_counter_write = 6;
409409         if (state->m_write_cassette==0)
410410         {   /* C'est la 1er fois => record*/
411                     cassette_device_image(space->machine())->change_state(
411                     cassette_device_image(space->machine())->change_state(
412412                  CASSETTE_MOTOR_ENABLED ,
413413                  CASSETTE_MASK_MOTOR);
414414            cassette_device_image(space->machine())->set_state(CASSETTE_RECORD);
src/mess/machine/c64_ieee488.h
r14559r14560
4848   DECLARE_WRITE_LINE_MEMBER( nmi_w );
4949   DECLARE_WRITE_LINE_MEMBER( dma_w );
5050   DECLARE_WRITE_LINE_MEMBER( reset_w );
51   
51
5252protected:
5353   // device-level overrides
5454   virtual void device_start();
r14559r14560
6363   required_device<device_t> m_tpi;
6464   required_device<ieee488_device> m_bus;
6565   required_device<c64_expansion_slot_device> m_exp;
66   
66
6767   int m_roml_sel;
6868};
6969 
src/mess/machine/c64_multiscreen.c
r14559r14560
99 
1010/*
1111 
12   PCB Layout
13   ----------
12    PCB Layout
13    ----------
1414 
15               |===================|
16               |           ROM6    |
17               |  MC14066          |
18               |                   |
19   |===============|           ROM5    |
20   |=|                                 |
21   |=|                                 |
22   |=|    RAM         BAT      ROM4    |
23   |=|                                 |
24   |=|                                 |
25   |=|    ROM0                 ROM3    |
26   |=|                                 |
27   |=|                                 |
28   |===============|  LS138    ROM2    |
29               |  LS138            |
30               |  LS174            |
31               |  LS133    ROM1    |
32               |===================|
15                    |===================|
16                    |           ROM6    |
17                    |  MC14066          |
18                    |                   |
19    |===============|           ROM5    |
20    |=|                                 |
21    |=|                                 |
22    |=|    RAM         BAT      ROM4    |
23    |=|                                 |
24    |=|                                 |
25    |=|    ROM0                 ROM3    |
26    |=|                                 |
27    |=|                                 |
28    |===============|  LS138    ROM2    |
29                    |  LS138            |
30                    |  LS174            |
31                    |  LS133    ROM1    |
32                    |===================|
3333 
34   BAT   - BR2325 lithium battery
35   RAM   - ? 8Kx8 RAM
36   ROM0  - ? 16Kx8 EPROM
37   ROM1  - ? 32Kx8 EPROM
38   ROM2  - ? 32Kx8 EPROM
39   ROM3  - ? 32Kx8 EPROM
40   ROM4  - not populated
41   ROM5  - not populated
42   ROM6  - not populated
34    BAT   - BR2325 lithium battery
35    RAM   - ? 8Kx8 RAM
36    ROM0  - ? 16Kx8 EPROM
37    ROM1  - ? 32Kx8 EPROM
38    ROM2  - ? 32Kx8 EPROM
39    ROM3  - ? 32Kx8 EPROM
40    ROM4  - not populated
41    ROM5  - not populated
42    ROM6  - not populated
4343 
4444*/
4545 
4646/*
4747 
48   TODO:
49   
50   - M6802 board
48    TODO:
5149 
50    - M6802 board
51 
5252*/
5353 
5454#include "c64_multiscreen.h"
r14559r14560
114114UINT8 c64_multiscreen_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
115115{
116116   UINT8 data = 0;
117   
117
118118   if (!roml)
119119   {
120120      int bank = m_bank & 0x0f;
r14559r14560
131131   else if (!romh)
132132   {
133133      int bank = m_bank & 0x0f;
134     
134
135135      if (bank == BANK_RAM)
136136      {
137137         data = m_roml[offset & 0x3fff];
r14559r14560
155155   if (offset >= 0x8000 && offset < 0xa000)
156156   {
157157      int bank = m_bank & 0x0f;
158     
158
159159      if (bank == BANK_RAM)
160160      {
161161         m_ram[offset & 0x1fff] = data;
src/mess/machine/apollo_eth.c
r14559r14560
135135   device_t *device = (device_t *) ptr;
136136
137137   /*
138    * Save the socket's current mode, and put it in non-blocking mode;
139    * we drain it by reading packets until we get an error
140    * (which is normally a "nothing more to be read" error).
141    */
138     * Save the socket's current mode, and put it in non-blocking mode;
139     * we drain it by reading packets until we get an error
140     * (which is normally a "nothing more to be read" error).
141     */
142142   int save_mode = fcntl(eth_socket, F_GETFL, 0);
143143   if (save_mode == -1)
144144   {
r14559r14560
191191int apollo_eth_setfilter(device_t *device, int node_id)
192192{
193193   /*
194   tcpdump -i eth0 -dd ether dst 08:00:1e:01:ae:a5 or ether dst 09:00:1e:00:00:00 or ether dst 09:00:1e:00:00:01 or ether broadcast
194    tcpdump -i eth0 -dd ether dst 08:00:1e:01:ae:a5 or ether dst 09:00:1e:00:00:00 or ether dst 09:00:1e:00:00:01 or ether broadcast
195195
196   (000) ld       [2]
197   (001) jeq      #0x1e01aea5      jt 2   jf 4
198   (002) ldh      [0]
199   (003) jeq      #0x800           jt 11   jf 12
200   (004) jeq      #0x1e000000      jt 6   jf 5
201   (005) jeq      #0x1e000001      jt 6   jf 8
202   (006) ldh      [0]
203   (007) jeq      #0x900           jt 11   jf 12
204   (008) jeq      #0xffffffff      jt 9   jf 12
205   (009) ldh      [0]
206   (010) jeq      #0xffff          jt 11   jf 12
207   (011) ret      #65535
208   (012) ret      #0
209   */
196    (000) ld       [2]
197    (001) jeq      #0x1e01aea5      jt 2    jf 4
198    (002) ldh      [0]
199    (003) jeq      #0x800           jt 11   jf 12
200    (004) jeq      #0x1e000000      jt 6    jf 5
201    (005) jeq      #0x1e000001      jt 6    jf 8
202    (006) ldh      [0]
203    (007) jeq      #0x900           jt 11   jf 12
204    (008) jeq      #0xffffffff      jt 9    jf 12
205    (009) ldh      [0]
206    (010) jeq      #0xffff          jt 11   jf 12
207    (011) ret      #65535
208    (012) ret      #0
209    */
210210   static struct sock_filter bpf_code[]= {
211211      { 0x20, 0, 0, 0x00000002 },
212212      { 0x15, 0, 2, 0x1e01aea5 },
src/mess/machine/pce.c
r14559r14560
273273{
274274   pce_state *state = machine.driver_data<pce_state>();
275275   pce_cd_init( machine );
276   machine.device<nvram_device>("nvram")->set_base(state->m_cd.bram, PCE_BRAM_SIZE);   
276   machine.device<nvram_device>("nvram")->set_base(state->m_cd.bram, PCE_BRAM_SIZE);
277277}
278278
279279MACHINE_RESET( mess_pce )
src/mess/machine/c64_stardos.c
r14559r14560
6464inline void c64_stardos_cartridge_device::charge_io1_capacitor()
6565{
6666   m_io1_charge++;
67   
67
6868   if (m_io1_charge >= IO1_FULL_CHARGE)
6969   {
7070      m_exrom = 0;
r14559r14560
8080void c64_stardos_cartridge_device::charge_io2_capacitor()
8181{
8282   m_io2_charge++;
83   
83
8484   if (m_io2_charge >= IO2_FULL_CHARGE)
8585   {
8686      m_exrom = 1;
r14559r14560
126126UINT8 c64_stardos_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
127127{
128128   UINT8 data = 0;
129   
129
130130   if (!roml || !romh)
131131   {
132132      // TODO BITSWAP8(7,6,5,4,3,1,2,0) ?
src/mess/machine/c64_stardos.h
r14559r14560
3535 
3636   // optional information overrides
3737   virtual ioport_constructor device_input_ports() const;
38   
38
3939   static INPUT_CHANGED( reset );
4040 
4141protected:
r14559r14560
4646   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4747   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
4848   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
49   
49
5050private:
5151   inline void charge_io1_capacitor();
5252   inline void charge_io2_capacitor();
53   
53
5454   int m_io1_charge;
5555   int m_io2_charge;
5656};
src/mess/machine/c64_ross.c
r14559r14560
6565UINT8 c64_ross_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6666{
6767   UINT8 data = 0;
68   
68
6969   if (!roml || !romh)
7070   {
7171      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
72     
72
7373      data = m_roml[addr & m_roml_mask];
7474   }
7575 
src/mess/machine/c64_ross.h
r14559r14560
4141   // device_c64_expansion_card_interface overrides
4242   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4343   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
44   
44
4545private:
4646   UINT8 m_bank;
4747};
src/mess/machine/c64_comal80.c
r14559r14560
6262UINT8 c64_comal80_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml || !romh)
6767   {
6868      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
src/mess/machine/c64_comal80.h
r14559r14560
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43   
43
4444private:
4545   UINT8 m_bank;
4646};
src/mess/machine/ti99/ti99defs.h
r14559r14560
11/****************************************************************************
22
33    Common definitions for TI family
4   Should be included in each component.   
4    Should be included in each component.
55
6   Michael Zapf
7   
6    Michael Zapf
7
88*****************************************************************************/
99
1010#ifndef __TI99DEFS__
r14559r14560
1212
1313// TI-99/4(A)
1414#define region_grom    "cons_grom"
15#define region_grom_cart    "cart_grom"
15#define region_grom_cart   "cart_grom"
1616#define TMS9901_TAG    "tms9901"
1717#define TIBOARD_TAG    "ti_board"
1818#define DATAMUX_TAG    "datamux_16_8"
1919#define VIDEO_SYSTEM_TAG "video"
2020#define TMS9928A_TAG   "tms9928a"
21#define V9938_TAG       "v9938"
21#define V9938_TAG      "v9938"
2222#define SCREEN_TAG      "screen"
2323#define TISOUNDCHIP_TAG "soundchip"
2424#define TISOUND_TAG    "tisound"
r14559r14560
3333// TI-99/8
3434#define SRAM_TAG      "sram8"
3535#define DRAM_TAG      "dram8"
36#define MAPPER_TAG       "mapper"
36#define MAPPER_TAG      "mapper"
3737#define SPEECH_TAG      "speech"
3838
3939// Geneve
r14559r14560
4343#define GCLOCK_TAG      "mm58274c"
4444
4545#define READ16Z_MEMBER(name)         void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset,  ATTR_UNUSED UINT16 *value, ATTR_UNUSED UINT16 mem_mask)
46#define DECLARE_READ16Z_MEMBER(name)    void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 *value, ATTR_UNUSED UINT16 mem_mask = 0xffff)
46#define DECLARE_READ16Z_MEMBER(name)   void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT16 *value, ATTR_UNUSED UINT16 mem_mask = 0xffff)
4747#define READ8Z_MEMBER(name)            void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 *value, ATTR_UNUSED UINT8 mem_mask)
4848#define DECLARE_READ8Z_MEMBER(name)      void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED UINT8 *value, ATTR_UNUSED UINT8 mem_mask = 0xff)
4949
5050#define GENMOD 0x01
5151
5252/*
53   Base class for all devices that have a special read method. This read
54   methods differs from the standard READ8/16 by allowing for a "high-impedance"
55   state "Z" which means that the bus lines are not changed. That way, we can
56   built busses with parallel devices as in the real machine, and only the
57   active device changes the bus lines.
53    Base class for all devices that have a special read method. This read
54    methods differs from the standard READ8/16 by allowing for a "high-impedance"
55    state "Z" which means that the bus lines are not changed. That way, we can
56    built busses with parallel devices as in the real machine, and only the
57    active device changes the bus lines.
5858*/
5959class bus8z_device : public device_t
6060{
r14559r14560
7373};
7474
7575/****************************************************************************
76   Constants
76    Constants
7777****************************************************************************/
7878
7979enum
src/mess/machine/c64_mikro_assembler.c
r14559r14560
5050UINT8 c64_mikro_assembler_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
5151{
5252   UINT8 data = 0;
53   
53
5454   if (!roml || !romh || !io1 || !io2)
5555   {
5656      data = m_roml[offset & 0x1fff];
src/mess/machine/c64_rex.c
r14559r14560
6060UINT8 c64_rex_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6161{
6262   UINT8 data = 0;
63   
63
6464   if (!roml)
6565   {
6666      data = m_roml[offset & 0x1fff];
src/mess/machine/vic1210.c
r14559r14560
113113UINT8 vic1210_device::vic20_blk5_r(address_space &space, offs_t offset)
114114{
115115   UINT8 data = 0;
116   
116
117117   if (m_blk5)
118118   {
119119      data = m_blk5[offset & 0xfff];
120120   }
121   
121
122122   return data;
123123}
src/mess/machine/ncr5390.c
r14559r14560
200200      state &= STATE_MASK;
201201      step(true);
202202      break;
203   
203
204204   case ARB_TIMEOUT_BUSY << SUB_SHIFT:
205205      if(timeout) {
206206         scsi_bus->data_w(scsi_refid, 0);
r14559r14560
333333         if(!command_length)
334334            seq = 4;
335335      }
336         
336
337337      state = DISC_SEL_WAIT_REQ;
338338      break;
339339
r14559r14560
470470   else
471471      scsi_bus->data_w(scsi_refid, 0);
472472
473   scsi_bus->ctrl_w(scsi_refid, S_ACK, S_ACK);   
473   scsi_bus->ctrl_w(scsi_refid, S_ACK, S_ACK);
474474   scsi_bus->ctrl_wait(scsi_refid, S_REQ, S_REQ);
475475   delay_cycles(sync_period);
476476}
r14559r14560
586586
587587WRITE8_MEMBER(ncr5390_device::command_w)
588588{
589   //   fprintf(stderr, "%s: command_w %02x (%08x)\n", tag(), data, cpu_get_pc(&space.device()));
589   //  fprintf(stderr, "%s: command_w %02x (%08x)\n", tag(), data, cpu_get_pc(&space.device()));
590590   if(command_pos == 2) {
591591      status |= S_GROSS_ERROR;
592592      check_irq();
r14559r14560
620620
621621   bool msg;
622622   int extra;
623//   int total_len;
623//  int total_len;
624624   command_params_size(msg, extra);
625625   if(fifo_pos < extra) {
626626      logerror("%s: cmd without extra bytes (fp=%d, extra=%d)\n", tag(), fifo_pos, extra);
r14559r14560
636636         logerror("%s: cmd without complete msg (fp=%d, extra=%d, len=%d)\n", tag(), fifo_pos, extra, len);
637637         exit(0);
638638      }
639//      total_len = len+extra;
639//      total_len = len+extra;
640640   }// else
641//      total_len = extra;
641//      total_len = extra;
642642
643643   switch(c) {
644644   case CM_NOP:
r14559r14560
680680      xfr_phase = scsi_bus->ctrl_r() & S_PHASE_MASK;
681681      step(false);
682682      break;
683     
683
684684   case CI_COMPLETE:
685685      state = INIT_CPT_RECV_BYTE_ACK;
686686      recv_byte();
r14559r14560
701701      scsi_bus->ctrl_w(scsi_refid, 0, S_ACK);
702702      step(false);
703703      break;
704     
704
705705   default:
706706      logerror("%s: start unimplemented command %02x\n", tag(), c);
707707      exit(0);
src/mess/machine/n82077aa.c
r14559r14560
590590
591591   case 0x0f:
592592      return command_pos == 3 ? C_SEEK        : C_INCOMPLETE;
593     
593
594594   case 0x12:
595595      return command_pos == 2 ? C_PERPENDICULAR : C_INCOMPLETE;
596596
r14559r14560
643643   case C_SENSE_INTERRUPT_STATUS: {
644644      logerror("%s: command sense interrupt status\n", tag());
645645      main_phase = PHASE_RESULT;
646     
646
647647      int fid;
648648      for(fid=0; fid<4 && !flopi[fid].irq; fid++);
649649      if(fid == 4) {
r14559r14560
768768{
769769   fi.main_state = READ_DATA;
770770   fi.sub_state = HEAD_LOAD_DONE;
771   
771
772772   logerror("%s: command read data%s%s%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x dtl=%02x rate=%d\n",
773773          tag(),
774774          command[0] & 0x80 ? " mt" : "",
r14559r14560
828828            fi.pcn++;
829829         fi.sub_state = HEAD_LOAD_DONE;
830830         break;
831         
831
832832      case SEEK_DONE:
833833         counter = 0;
834834         fi.sub_state = SCAN_ID;
r14559r14560
889889{
890890   fi.main_state = READ_DATA;
891891   fi.sub_state = HEAD_LOAD_DONE;
892   
892
893893   logerror("%s: command read id%s, rate=%d\n",
894894          tag(),
895895          command[0] & 0x40 ? " mfm" : "",
src/mess/machine/ncr5390.h
r14559r14560
1212public:
1313   ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
1414   void set_cb(line_cb_t irq_cb, line_cb_t drq_cb);
15   
15
1616   DECLARE_ADDRESS_MAP(map, 8);
1717
1818   DECLARE_READ8_MEMBER(tcount_lo_r);
src/mess/machine/c64_dinamic.c
r14559r14560
6262UINT8 c64_dinamic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml)
6767   {
6868      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
src/mess/machine/c64_dinamic.h
r14559r14560
3939 
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
42   
42
4343private:
4444   UINT8 m_bank;
4545};
src/mess/machine/ser_mouse.c
r14559r14560
104104   if(m_tail != m_head && is_transmit_register_empty())
105105      transmit_register_setup(unqueue_data());
106106}
107   
107
108108void microsoft_mouse_device::mouse_trans(int dx, int dy, int nb, int mbc)
109109{
110110   /* split deltas into packets of -128..+127 max */
r14559r14560
154154   Y7'-Y0' movement in Y direction since sending of Y7-Y0 in signed byte
155155   format (-128..+127), positive direction up
156156
157   The last two bytes in the packet (bytes 4 and 5) contains information
157   The last two bytes in the packet (bytes 4 and 5) contains information
158158   about movement data changes which have occurred after data bytes 2 and 3 have been sent. */
159159
160160void mouse_systems_mouse_device::mouse_trans(int dx, int dy, int nb, int mbc)
src/mess/machine/ser_mouse.h
r14559r14560
5050protected:
5151   virtual void set_frame() { set_data_frame(7, 1, SERIAL_PARITY_NONE); }
5252   virtual void mouse_trans(int dx, int dy, int nb, int mbc);
53   virtual void device_reset() {m_old_rts = 0; serial_mouse_device::device_reset();}
53   virtual void device_reset() {m_old_rts = 0; serial_mouse_device::device_reset();}
5454private:
5555   void check_state();
5656   UINT8 m_old_rts;
src/mess/machine/c64_easyflash.c
r14559r14560
6161   PORT_DIPNAME( 0x01, 0x00, "Boot" )
6262   PORT_DIPSETTING(    0x00, "Disable" )
6363   PORT_DIPSETTING(    0x01, "Boot" )
64   
64
6565   PORT_START("RESET")
6666   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Reset") PORT_CHANGED(c64_easyflash_cartridge_device::reset, 0)
6767INPUT_PORTS_END
r14559r14560
129129UINT8 c64_easyflash_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
130130{
131131   UINT8 data = 0;
132   
132
133133   if (!roml)
134134   {
135135      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
r14559r14560
170170      if (!BIT(offset, 1))
171171      {
172172         /*
173         
174            bit      description
175             
176            0      BA13
177            1      BA14
178            2      BA15
179            3      BA16
180            4      BA17
181            5      BA18
182            6       
183            7       
184         
185         */
186         
173 
174                bit     description
175 
176                0       BA13
177                1       BA14
178                2       BA15
179                3       BA16
180                4       BA17
181                5       BA18
182                6
183                7
184 
185            */
186 
187187         m_bank = data & 0x3f;
188188      }
189189      else
190190      {
191191         /*
192         
193            bit      description
194             
195            0      GAME
196            1      EXROM
197            2      MODE
198            3       
199            4       
200            5       
201            6       
202            7      LED
203         
204         */
205         
192 
193                bit     description
194 
195                0       GAME
196                1       EXROM
197                2       MODE
198                3
199                4
200                5
201                6
202                7       LED
203 
204            */
205 
206206         m_mode = data;
207207      }
208208   }
src/mess/machine/c64_easyflash.h
r14559r14560
3636   // optional information overrides
3737   virtual machine_config_constructor device_mconfig_additions() const;
3838   virtual ioport_constructor device_input_ports() const;
39   
39
4040   static INPUT_CHANGED( reset );
41   
41
4242protected:
4343   // device-level overrides
4444   virtual void device_start();
r14559r14560
5353private:
5454   required_device<amd_29f040_device> m_flash_roml;
5555   required_device<amd_29f040_device> m_flash_romh;
56   
56
5757   UINT8 m_bank;
5858   UINT8 m_mode;
5959};
src/mess/machine/c64_zaxxon.c
r14559r14560
5252UINT8 c64_zaxxon_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
5353{
5454   UINT8 data = 0;
55   
55
5656   if (!roml)
5757   {
5858      data = m_roml[offset & 0xfff];
59     
59
6060      m_bank = BIT(offset, 12);
6161   }
6262   else if (!romh)
src/mess/machine/c64_georam.c
r14559r14560
4242{
4343   // allocate memory
4444   m_ram = auto_alloc_array(machine(), UINT8, 0x80000);
45   
45
4646   // state saving
4747   save_item(NAME(m_bank));
4848}
r14559r14560
6565UINT8 c64_georam_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6666{
6767   UINT8 data = 0;
68   
68
6969   if (!io1)
7070   {
7171      offs_t addr = (m_bank << 8) | (offset & 0xff);
r14559r14560
9494         m_bank = ((data & 0x1f) << 6) | (m_bank & 0x3f);
9595      }
9696      else
97      {     
97      {
9898         m_bank = (m_bank & 0x7c0) | (data & 0x3f);
9999      }
100100   }
src/mess/machine/c64_georam.h
r14559r14560
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43   
43
4444private:
4545   UINT16 m_bank;
4646};
src/mess/machine/pc1401.c
r14559r14560
120120   UINT8 *ram = machine.region("maincpu")->base() + 0x2000;
121121   UINT8 *cpu = sc61860_internal_ram(main_cpu);
122122
123   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);   
123   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);
124124   machine.device<nvram_device>("ram_nvram")->set_base(ram, 0x2800);
125125}
126126
src/mess/machine/isa_gus.c
r14559r14560
4545   switch(offset)
4646   {
4747      case 0:
48//         if(m_timer_ctrl & 0x01)
48//          if(m_timer_ctrl & 0x01)
4949            return m_adlib_status;
50//         return m_fake_adlib_status;
50//          return m_fake_adlib_status;
5151      case 1:
5252         return m_adlib_data;
5353   }
r14559r14560
256256               if(!(m_voice[x].voice_ctrl & 0x08))
257257               {
258258                  m_voice[x].voice_ctrl |= 0x01;
259//                     m_voice[x].current_addr = m_voice[x].end_addr;
259//                          m_voice[x].current_addr = m_voice[x].end_addr;
260260               }
261261               else
262262               {
r14559r14560
284284               if(!(m_voice[x].voice_ctrl & 0x08))
285285               {
286286                  m_voice[x].voice_ctrl |= 0x01;
287//                     m_voice[x].current_addr = m_voice[x].start_addr;
287//                          m_voice[x].current_addr = m_voice[x].start_addr;
288288               }
289289               else
290290               {
r14559r14560
12301230   MCFG_SOUND_CONFIG(gus_gf1_config)
12311231   MCFG_SOUND_ROUTE(0,"lspeaker",0.50)
12321232   MCFG_SOUND_ROUTE(1,"rspeaker",0.50)
1233//   MCFG_ACIA6850_ADD("midi",gus_midi_interface)
1233//  MCFG_ACIA6850_ADD("midi",gus_midi_interface)
12341234MACHINE_CONFIG_END
12351235
12361236static INPUT_PORTS_START( gus_joy )
r14559r14560
12971297   case 0x01:
12981298      return m_gf1->mix_ctrl_r(space,offset);
12991299      /* port 0x2X6 - IRQ status (active high)
1300       * bit 0 - MIDI transmit IRQ
1301       * bit 1 - MIDI receive IRQ
1302       * bit 2 - Timer 1 IRQ
1303       * bit 3 - Timer 2 IRQ
1304       * bit 4 - reserved (always 0)
1305       * bit 5 - wavetable IRQ
1306       * bit 6 - volume ramp IRQ
1307       * bit 7 - DRAM TC DMA IRQ
1308       */
1300         * bit 0 - MIDI transmit IRQ
1301         * bit 1 - MIDI receive IRQ
1302         * bit 2 - Timer 1 IRQ
1303         * bit 3 - Timer 2 IRQ
1304         * bit 4 - reserved (always 0)
1305         * bit 5 - wavetable IRQ
1306         * bit 6 - volume ramp IRQ
1307         * bit 7 - DRAM TC DMA IRQ
1308         */
13091309   case 0x06:
13101310      return m_irq_status;
13111311   case 0x08:
r14559r14560
13621362{
13631363   switch(offset)
13641364   {
1365//   case 0x00:
1366//      return m_midi->status_read(space,0);
1367//   case 0x01:
1368//      return m_midi->data_read(space,0);
1365//  case 0x00:
1366//      return m_midi->status_read(space,0);
1367//  case 0x01:
1368//      return m_midi->data_read(space,0);
13691369   case 0x02:
13701370   case 0x03:
13711371      return m_gf1->global_reg_select_r(space,offset-2);
r14559r14560
13871387   switch(offset)
13881388   {
13891389   case 0x00:
1390//      m_midi->control_write(space,0,data);
1390//      m_midi->control_write(space,0,data);
13911391      break;
13921392   case 0x01:
1393//      m_midi->data_write(space,0,data);
1393//      m_midi->data_write(space,0,data);
13941394      break;
13951395   case 0x02:
13961396   case 0x03:
src/mess/machine/c64_easy_calc_result.c
r14559r14560
6262UINT8 c64_easy_calc_result_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml)
6767   {
6868      data = m_roml[offset & 0x1fff];
src/mess/machine/lynx.c
r14559r14560
116116   colbuf = state->m_blitter.colbuf + y * 80 + x / 2;
117117
118118   /* a note on timing: The hardware packs the pixel data and updates the screen and collision buffer a byte at a time.
119   Thus the buffer update for two pixels takes 3 memory accesses for a normal sprite (write to screen buffer, read/write to collision buffer).
120   +1 memory access for palette fetch?
121   */
119    Thus the buffer update for two pixels takes 3 memory accesses for a normal sprite (write to screen buffer, read/write to collision buffer).
120    +1 memory access for palette fetch?
121    */
122122
123123   switch (mode&0x7)
124124   {
src/mess/machine/c64_magic_desk.c
r14559r14560
6262UINT8 c64_magic_desk_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml)
6767   {
6868      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
r14559r14560
8282   if (!io1)
8383   {
8484      m_exrom = BIT(data, 7);
85     
85
8686      m_bank = data & 0x3f;
8787   }
8888}
src/mess/machine/c64_magic_desk.h
r14559r14560
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43   
43
4444private:
4545   UINT8 m_bank;
4646};
src/mess/machine/c64_dela_ep64.c
r14559r14560
8484void c64_dela_ep64_cartridge_device::device_start()
8585{
8686   m_rom = subregion("rom")->base();
87   
87
8888   // state saving
8989   save_item(NAME(m_bank));
9090   save_item(NAME(m_reset));
r14559r14560
113113UINT8 c64_dela_ep64_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
114114{
115115   UINT8 data = 0;
116   
116
117117   if (!roml)
118118   {
119119      if (m_reset)
r14559r14560
123123      else
124124      {
125125         offs_t addr = (m_bank << 13) | (offset & 0x1fff);
126         
126
127127         if (!m_rom0_ce) data |= m_roml[offset & 0x1fff];
128128         if (!m_rom1_ce) data |= m_rom[0x0000 + addr];
129129         if (!m_rom2_ce) data |= m_rom[0x8000 + addr];
r14559r14560
143143   if (!io1)
144144   {
145145      /*
146       
147         bit      description
148         
149         0      IC6 _CE
150         1      IC5 _CE
151         2       
152         3      IC4 _CE
153         4      A13
154         5      A14
155         6       
156         7      EXROM
157       
158      */
159       
146 
147            bit     description
148 
149            0       IC6 _CE
150            1       IC5 _CE
151            2
152            3       IC4 _CE
153            4       A13
154            5       A14
155            6
156            7       EXROM
157 
158        */
159 
160160      m_reset = 0;
161     
161
162162      m_rom0_ce = BIT(data, 3);
163163      m_rom1_ce = BIT(data, 1);
164164      m_rom2_ce = BIT(data, 0);
165165 
166166      m_bank = (data >> 4) & 0x03;
167     
167
168168      m_exrom = BIT(data, 7);
169169   }
170170}
src/mess/machine/isa.h
r14559r14560
176176   UINT8 dack_r(int line);
177177   void dack_w(int line,UINT8 data);
178178   void eop_w(int state);
179   
179
180180   void nmi();
181181   void set_nmi_state(bool enabled) { m_nmi_enabled = enabled; }
182182
r14559r14560
203203
204204   device_isa8_card_interface *m_dma_device[8];
205205   bool                  m_dma_eop[8];
206   const char                *m_cputag;
206   const char               *m_cputag;
207207   bool                  m_nmi_enabled;
208208};
209209
src/mess/machine/c64_dela_ep64.h
r14559r14560
4646   // device_c64_expansion_card_interface overrides
4747   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
49   
49
5050private:
5151   UINT8 *m_rom;
5252 
src/mess/machine/c64_magic_formel.c
r14559r14560
3737 
3838        bit     description
3939 
40        PA0      ROM A13
41        PA1      ROM A14
42        PA2      ROM A15
43        PA3      ROM _OE
44        PA4      RAM _OE
45        PA5       
46        PA6       
47        PA7       
40        PA0     ROM A13
41        PA1     ROM A14
42        PA2     ROM A15
43        PA3     ROM _OE
44        PA4     RAM _OE
45        PA5
46        PA6
47        PA7
4848 
4949    */
50   
50
5151   logerror("PA %02x\n",data);
5252   m_rom_bank = data & 0x0f;
5353 
r14559r14560
6262 
6363        bit     description
6464 
65        PB0      RAM A10
66        PB1      RAM A11
67        PB2      RAM A9
68        PB3      RAM A8
69        PB4      RAM A12
65        PB0     RAM A10
66        PB1     RAM A11
67        PB2     RAM A9
68        PB3     RAM A8
69        PB4     RAM A12
7070        PB5
7171        PB6
72        PB7      ROMH enable
72        PB7     ROMH enable
7373 
7474    */
7575   logerror("PB %02x\n",data);
7676   m_ram_bank = data & 0x1f;
77   
77
7878   m_pb7 = BIT(data, 7);
7979 
8080   if (!m_pb7)
r14559r14560
135135INPUT_CHANGED( c64_magic_formel_cartridge_device::freeze )
136136{
137137   /*
138   if (!newval && (m_pb7_ff & m_cb2_ff))
139   {
140      m_cb2_ff = 0;
141       
142      m_slot->nmi_w(ASSERT_LINE);
143   }
144   else
145   {
146      m_slot->nmi_w(CLEAR_LINE);
147   }
148   */
138    if (!newval && (m_pb7_ff & m_cb2_ff))
139    {
140        m_cb2_ff = 0;
141 
142        m_slot->nmi_w(ASSERT_LINE);
143    }
144    else
145    {
146        m_slot->nmi_w(CLEAR_LINE);
147    }
148    */
149149}
150150 
151151static INPUT_PORTS_START( c64_magic_formel )
r14559r14560
183183   m_cb2_ff(0),
184184   m_rom_oe(0),
185185   m_ram_oe(0),
186   m_pb7(1)   
186   m_pb7(1)
187187{
188188}
189189 
r14559r14560
228228UINT8 c64_magic_formel_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
229229{
230230   UINT8 data = 0;
231   
231
232232   if (!romh && !m_rom_oe)
233233   {
234234      UINT8 bank = m_pb7_ff ? m_rom_bank : 0;
src/mess/machine/c64_dela_ep256.c
r14559r14560
103103void c64_dela_ep256_cartridge_device::device_start()
104104{
105105   m_rom = subregion("rom")->base();
106   
106
107107   // state saving
108108   save_item(NAME(m_bank));
109109   save_item(NAME(m_reset));
r14559r14560
129129UINT8 c64_dela_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
130130{
131131   UINT8 data = 0;
132   
132
133133   if (!roml)
134134   {
135135      if (m_reset)
r14559r14560
156156   if (!io2 && ((offset & 0xf0) == 0xa0))
157157   {
158158      /*
159       
160         bit      description
161         
162         0      socket selection bit 0
163         1      socket selection bit 1
164         2      socket selection bit 2
165         3
166         4      bank selection bit 0
167         5      bank selection bit 1
168         6       
169         7      EXROM
170       
171      */
172       
159 
160            bit     description
161 
162            0       socket selection bit 0
163            1       socket selection bit 1
164            2       socket selection bit 2
165            3
166            4       bank selection bit 0
167            5       bank selection bit 1
168            6
169            7       EXROM
170 
171        */
172 
173173      m_reset = 0;
174     
174
175175      m_bank = ((data & 0x07) << 2) | ((data >> 4) & 0x03);
176     
176
177177      m_exrom = BIT(data, 7);
178178   }
179179}
src/mess/machine/c64_magic_formel.h
r14559r14560
3838   virtual ioport_constructor device_input_ports() const;
3939 
4040   static INPUT_CHANGED( freeze );
41   
41
4242   // not really public
4343   DECLARE_WRITE8_MEMBER( pia_pa_w );
4444   DECLARE_WRITE8_MEMBER( pia_pb_w );
r14559r14560
5353   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
5454   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
5555   virtual int c64_game_r(offs_t offset, int ba, int rw, int hiram);
56   
56
5757private:
5858   required_device<pia6821_device> m_pia;
59   
59
6060   UINT8 m_rom_bank;
6161   UINT8 m_ram_bank;
6262   int m_pb7_ff;
src/mess/machine/c64_dela_ep256.h
r14559r14560
4646   // device_c64_expansion_card_interface overrides
4747   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
49   
49
5050private:
5151   UINT8 *m_rom;
5252 
src/mess/machine/c64exp.c
r14559r14560
2323
2424
2525// slot names for the C64 cartridge types
26const char *CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] =
26const char *CRT_C64_SLOT_NAMES[_CRT_C64_COUNT] =
2727{
2828   "standard",
2929   UNSUPPORTED,
r14559r14560
283283            // read the header
284284            cbm_crt_header header;
285285            fread(&header, CRT_HEADER_LENGTH);
286           
286
287287            if (memcmp(header.signature, CRT_SIGNATURE, 16) != 0)
288288               return IMAGE_INIT_FAIL;
289           
289
290290            UINT16 hardware = pick_integer_be(header.hardware, 0, 2);
291           
291
292292            // TODO support other cartridge hardware
293293            if (hardware != CRT_C64_STANDARD)
294294               return IMAGE_INIT_FAIL;
295           
295
296296            if (LOG)
297297            {
298298               logerror("Name: %s\n", header.name);
r14559r14560
301301               logerror("EXROM: %u\n", header.exrom);
302302               logerror("GAME: %u\n", header.game);
303303            }
304         
304
305305            // determine ROM region lengths
306306            size_t roml_size = 0;
307307            size_t romh_size = 0;
308           
308
309309            while (!image_feof())
310310            {
311311               cbm_crt_chip chip;
312312               fread(&chip, CRT_CHIP_LENGTH);
313               
313
314314               UINT16 address = pick_integer_be(chip.start_address, 0, 2);
315315               UINT16 size = pick_integer_be(chip.image_size, 0, 2);
316316               UINT16 type = pick_integer_be(chip.chip_type, 0, 2);
317               
317
318318               if (LOG)
319319               {
320320                  logerror("CHIP Address: %04x\n", address);
321321                  logerror("CHIP Size: %04x\n", size);
322322                  logerror("CHIP Type: %04x\n", type);
323323               }
324               
324
325325               switch (address)
326326               {
327327               case 0x8000: roml_size += size; break;
r14559r14560
329329               case 0xe000: romh_size += size; break;
330330               default: logerror("Invalid CHIP loading address!\n"); break;
331331               }
332               
332
333333               fseek(size, SEEK_CUR);
334334            }
335335
336336            // allocate cartridge memory
337337            UINT8 *roml = NULL;
338338            UINT8 *romh = NULL;
339           
339
340340            if (roml_size) roml = m_cart->c64_roml_pointer(machine(), roml_size);
341341            if (romh_size) romh = m_cart->c64_romh_pointer(machine(), romh_size);
342           
342
343343            // read the data
344344            offs_t roml_offset = 0;
345345            offs_t romh_offset = 0;
346           
346
347347            fseek(CRT_HEADER_LENGTH, SEEK_SET);
348           
348
349349            while (!image_feof())
350350            {
351351               cbm_crt_chip chip;
352352               fread(&chip, CRT_CHIP_LENGTH);
353               
353
354354               UINT16 address = pick_integer_be(chip.start_address, 0, 2);
355355               UINT16 size = pick_integer_be(chip.image_size, 0, 2);
356356
r14559r14560
361361               case 0xe000: fread(romh + romh_offset, size); romh_offset += size; break;
362362               }
363363            }
364           
364
365365            m_cart->c64_exrom_w(header.exrom);
366366            m_cart->c64_game_w(header.game);
367367         }
r14559r14560
370370      {
371371         size = get_software_region_length("roml");
372372         if (size) memcpy(m_cart->c64_roml_pointer(machine(), size), get_software_region("roml"), size);
373         
373
374374         size = get_software_region_length("romh");
375375         if (size) memcpy(m_cart->c64_romh_pointer(machine(), size), get_software_region("romh"), size);
376376
r14559r14560
409409
410410
411411//-------------------------------------------------
412//  cd_r -
412//  cd_r -
413413//-------------------------------------------------
414414
415415UINT8 c64_expansion_slot_device::cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
r14559r14560
426426
427427
428428//-------------------------------------------------
429//  cd_w -
429//  cd_w -
430430//-------------------------------------------------
431431
432432void c64_expansion_slot_device::cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2)
src/mess/machine/pc1403.c
r14559r14560
148148   UINT8 *ram = machine.region("maincpu")->base() + 0x8000;
149149   UINT8 *cpu = sc61860_internal_ram(main_cpu);
150150
151   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);   
151   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);
152152   machine.device<nvram_device>("ram_nvram")->set_base(ram, 0x8000);
153153}
154154
src/mess/machine/c64exp.h
r14559r14560
173173   UINT8 *m_roml;
174174   UINT8 *m_romh;
175175   UINT8 *m_ram;
176   
176
177177   int m_roml_mask;
178178   int m_romh_mask;
179179   int m_ram_mask;
src/mess/machine/c64_rex_ep256.c
r14559r14560
103103void c64_rex_ep256_cartridge_device::device_start()
104104{
105105   m_rom = subregion("rom")->base();
106   
106
107107   // state saving
108108   save_item(NAME(m_bank));
109109   save_item(NAME(m_reset));
r14559r14560
129129UINT8 c64_rex_ep256_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
130130{
131131   UINT8 data = 0;
132   
132
133133   if (!roml)
134134   {
135135      if (m_reset)
r14559r14560
167167   if (!io2 && ((offset & 0xf0) == 0xa0))
168168   {
169169      /*
170       
171         bit      description
172         
173         0      socket selection bit 0
174         1      socket selection bit 1
175         2      socket selection bit 2
176         3
177         4
178         5      bank selection bit 0
179         6      bank selection bit 1
180         7
181       
182      */
183       
170 
171            bit     description
172 
173            0       socket selection bit 0
174            1       socket selection bit 1
175            2       socket selection bit 2
176            3
177            4
178            5       bank selection bit 0
179            6       bank selection bit 1
180            7
181 
182        */
183 
184184      m_reset = 0;
185     
185
186186      m_bank = ((data & 0x07) << 2) | ((data >> 5) & 0x03);
187187   }
188188}
src/mess/machine/c64_rex_ep256.h
r14559r14560
4646   // device_c64_expansion_card_interface overrides
4747   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
49   
49
5050private:
5151   UINT8 *m_rom;
5252 
src/mess/machine/apollo_net.c
r14559r14560
5151} icmp_header;
5252
5353//typedef struct {
54//   UINT16 version;
55//   UINT16 checksum;
56//   UINT16 packet_type;
57//   UINT16 control_header;
58//   UINT16 header_length;
59//   UINT16 header_data_length;
60//   UINT16 transaction_id;
54//  UINT16 version;
55//  UINT16 checksum;
56//  UINT16 packet_type;
57//  UINT16 control_header;
58//  UINT16 header_length;
59//  UINT16 header_data_length;
60//  UINT16 transaction_id;
6161//} control_header;
6262//
6363//typedef struct {
64//   UINT16 length;
65//   UINT16 current;
66//   UINT16 source_socket;
67//   UINT16 new_route;
64//  UINT16 length;
65//  UINT16 current;
66//  UINT16 source_socket;
67//  UINT16 new_route;
6868//} packet_address;
6969
7070#define ETHERNET_HEADER_SIZE sizeof(ethernet_header)
r14559r14560
7777#define ETHERNET_APOLLO_PREFIX 0x08001e
7878#define ETHERNET_APOLLO_DOMAIN_PREFIX 0x09001e
7979
80#define ICMP_ECHOREPLY      0   /* Echo Reply         */
81#define ICMP_ECHO          8   /* Echo Request         */
80#define ICMP_ECHOREPLY      0   /* Echo Reply           */
81#define ICMP_ECHO          8   /* Echo Request         */
8282
8383#define PACKET_HEADER_SIZE 64
8484
r14559r14560
295295}
296296
297297//static int set_packet_header1(UINT8 *packet_buffer, UINT32 dest_node_id,
298//      UINT32 source_node_id) {
298//      UINT32 source_node_id) {
299299//
300//   //0000  08 00 1e 02 61 6d 08 00  1e 04 20 e8 80 19 ff ff
301//   //0010  00 20 00 be 00 00 47 11  08 00 1e 02 61 6d 06 20
302//   //0020  00 00 00 00 08 00 1e 04  20 e8 00 01 00 02 61 6d
303//   //0030  20 00 00 00 00 04 20 e8  02 00 20 00 00 4e 00 02
304//   //0040  00 00 00 00 2e 04 00 01  20 e8 00 01 00 04 20 e8
300//  //0000  08 00 1e 02 61 6d 08 00  1e 04 20 e8 80 19 ff ff
301//  //0010  00 20 00 be 00 00 47 11  08 00 1e 02 61 6d 06 20
302//  //0020  00 00 00 00 08 00 1e 04  20 e8 00 01 00 02 61 6d
303//  //0030  20 00 00 00 00 04 20 e8  02 00 20 00 00 4e 00 02
304//  //0040  00 00 00 00 2e 04 00 01  20 e8 00 01 00 04 20 e8
305305//
306//   //0050  61 6d 06 20 ff ff 00 20  00 04 00 00 47 11 00 00
307//   //0060  00 02 61 6d 06 20 00 00  00 00 00 00 00 04 20 e8
308//   //0070  00 01 00 00 00 00 80 31  00 01
306//  //0050  61 6d 06 20 ff ff 00 20  00 04 00 00 47 11 00 00
307//  //0060  00 02 61 6d 06 20 00 00  00 00 00 00 00 04 20 e8
308//  //0070  00 01 00 00 00 00 80 31  00 01
309309//
310//   set_packet_header(packet_buffer, dest_node_id, source_node_id);
311//   set_word(packet_buffer + 8, 0x4711); // Apollo network number
312//   set_word(packet_buffer + 16, 0x0620); // ? was 0x0000
313//   set_word(packet_buffer + 28, 0x0001); // ? was 0x0003
310//  set_packet_header(packet_buffer, dest_node_id, source_node_id);
311//  set_word(packet_buffer + 8, 0x4711); // Apollo network number
312//  set_word(packet_buffer + 16, 0x0620); // ? was 0x0000
313//  set_word(packet_buffer + 28, 0x0001); // ? was 0x0003
314314
315//   set_long(packet_buffer + 34, 0x20000000L); // ? was 0x24000000L
316//   set_long(packet_buffer + 42, 0x02002000L); // ? was 0x01002400L
317//   set_word(packet_buffer + 46, 0x004e); // ? data_size + 0x22
318//   set_word(packet_buffer + 48, 0x0002); // ? data_size
319//   set_word(packet_buffer + 54, 0x2e04); // ? 0x0401
320//   set_word(packet_buffer + 56, 0x0001); // ? 0x0003
321//   set_word(packet_buffer + 60, 0x616d);
322//   set_word(packet_buffer + 62, 0x0000);
323//   return PACKET_HEADER_SIZE;
315//  set_long(packet_buffer + 34, 0x20000000L); // ? was 0x24000000L
316//  set_long(packet_buffer + 42, 0x02002000L); // ? was 0x01002400L
317//  set_word(packet_buffer + 46, 0x004e); // ? data_size + 0x22
318//  set_word(packet_buffer + 48, 0x0002); // ? data_size
319//  set_word(packet_buffer + 54, 0x2e04); // ? 0x0401
320//  set_word(packet_buffer + 56, 0x0001); // ? 0x0003
321//  set_word(packet_buffer + 60, 0x616d);
322//  set_word(packet_buffer + 62, 0x0000);
323//  return PACKET_HEADER_SIZE;
324324//}
325325
326326static int set_packet_header(UINT8 *packet_buffer, UINT32 dest_node_id,
327327      UINT32 source_node_id) {
328328   // --------- apollo header --------------
329329   set_word(packet_buffer, 0xffff);
330   //   set_word(packet_buffer + 2, data_size + PACKET_HEADER_SIZE);
330   //  set_word(packet_buffer + 2, data_size + PACKET_HEADER_SIZE);
331331   set_word(packet_buffer + 4, 0x00be);
332332   set_word(packet_buffer + 6, 0x0000);
333333   set_word(packet_buffer + 8, 0x0000); // Apollo network number
r14559r14560
344344   set_long(packet_buffer + 34, 0x24000000L);
345345   set_long(packet_buffer + 38, source_node_id);
346346   set_long(packet_buffer + 42, 0x01002400L);
347   //   set_word(packet_buffer + 46, data_size + 0x22);
348   //   set_word(packet_buffer + 48, data_size);
347   //  set_word(packet_buffer + 46, data_size + 0x22);
348   //  set_word(packet_buffer + 48, data_size);
349349   set_word(packet_buffer + 50, 0x0000);
350350   set_word(packet_buffer + 52, 0x0000);
351351   // --------- data --------------
r14559r14560
575575   service = (rx_data_length > 0x45) ? get_word(rx_data_buffer + 0x44) : 0xffff;
576576   first_sector = (rx_data_length > 0x6b) ? get_word(rx_data_buffer + 0x6a) : 0;
577577   // FIXME: hack
578//   last_sector = (rx_data_length > 0x6d) ? get_word(rx_data_buffer + 0x6c) : 0;
578//  last_sector = (rx_data_length > 0x6d) ? get_word(rx_data_buffer + 0x6c) : 0;
579579   last_sector = (rx_data_length > 0x6d) ? get_word(rx_data_buffer + 0x6c) : 0x0f;
580580
581581   set_ethernet_header(tx_data_buffer, client_ethernet_address);
r14559r14560
593593      get_file_data(APOLLO_NETBOOT_PATH, packet_buffer, first_sector, last_sector);
594594      DLOG1(("Net Server service=%04x (boot_$sysboot - sector %x of %x-%x)", service, current_sector, first_sector, last_sector));
595595      break;
596   case 0x0a: // boot_$get_uids    (get UIDs for OS paging file, network root and the node entry directory)
596   case 0x0a: // boot_$get_uids    (get UIDs for OS paging file, network root and the node entry directory)
597597      set_packet(packet_buffer, response_070a, sizeof(response_070a));
598598      DLOG1(("Net Server service=%04x (boot_$get_uids)", service));
599599      break;
r14559r14560
601601      get_dir_data( node_type == 7 ? APOLLO_SAU7_PATH : node_type == 8 ? APOLLO_SAU8_PATH : APOLLO_SAU14_PATH, packet_buffer);
602602      DLOG1(("Net Server service=%04x (boot_$mult_ld)", service));
603603      break;
604   case 0x12: // boot_$load    (ex /sau7/self_test, domain_os, ...)
604   case 0x12: // boot_$load    (ex /sau7/self_test, domain_os, ...)
605605      strcpy(pathname, node_type == 7 ? APOLLO_SAU7_PATH : node_type == 8 ? APOLLO_SAU8_PATH : APOLLO_SAU14_PATH);
606606      strcat(pathname, "/");
607607      strcat(pathname, get_file_name(rx_data_buffer + 0x48));
r14559r14560
702702static int is_ip_echo_request(const UINT8 ethernet_header[], const int data_length) {
703703   return data_length >= 0x30 && //
704704         get_word(ethernet_header + 0x0c) == ETHERNET_PACKET_TYPE_IP && //
705            get_byte(ethernet_header + 0x22) == ICMP_ECHO && //
706            is_my_ethernet_address(ethernet_header);
705           get_byte(ethernet_header + 0x22) == ICMP_ECHO && //
706           is_my_ethernet_address(ethernet_header);
707707}
708708
709709static UINT16 in_checksum(UINT8 *ptr, UINT32 nbytes)
r14559r14560
734734      const UINT8 rx_data[], int rx_data_length,
735735      UINT8 tx_data[]) {
736736
737//   static UINT8 arp_response[] = {
738//      0x08,0x00,0x1e,0x02,0x61,0x6d, // 0x00: Ethernet address of destination
739//      0x08,0x00,0x1e,0x04,0x20,0xe8, // 0x06: Ethernet address of sender
740//      0x08,0x06,                     // 0x0c: Protocol type
741//      0x00,0x01,                     // 0x0e: Hardware address space
742//      0x80,0x19,                     // 0x10: Protocol address space
743//      0x06,                          // 0x12: byte length of each hardware address
744//      0x04,                          // 0x13: byte length of each protocol address
745//      0x00,0x02,                     // 0x14: opcode (ares_op$REQUEST | ares_op$REPLY)
746//      0x08,0x00,0x1e,0x04,0x20,0xe8, // 0x16: Hardware address of sender of this packet
747//      0x00,0x04,0x20,0xe8,           // 0x1c: Protocol address of sender of this packet
748//      0x08,0x00,0x1e,0x02,0x61,0x6d, // 0x20: Hardware address of target of this packet (if known)
749//      0x00,0x02,0x61,0x6d,           // 0x26: Protocol address of target
750//      ...
751//   };
737//  static UINT8 arp_response[] = {
738//      0x08,0x00,0x1e,0x02,0x61,0x6d, // 0x00: Ethernet address of destination
739//      0x08,0x00,0x1e,0x04,0x20,0xe8, // 0x06: Ethernet address of sender
740//      0x08,0x06,                     // 0x0c: Protocol type
741//      0x00,0x01,                     // 0x0e: Hardware address space
742//      0x80,0x19,                     // 0x10: Protocol address space
743//      0x06,                          // 0x12: byte length of each hardware address
744//      0x04,                          // 0x13: byte length of each protocol address
745//      0x00,0x02,                     // 0x14: opcode (ares_op$REQUEST | ares_op$REPLY)
746//      0x08,0x00,0x1e,0x04,0x20,0xe8, // 0x16: Hardware address of sender of this packet
747//      0x00,0x04,0x20,0xe8,           // 0x1c: Protocol address of sender of this packet
748//      0x08,0x00,0x1e,0x02,0x61,0x6d, // 0x20: Hardware address of target of this packet (if known)
749//      0x00,0x02,0x61,0x6d,           // 0x26: Protocol address of target
750//      ...
751//  };
752752
753753   UINT16 tx_data_length = rx_data_length;
754754   memcpy(tx_data, rx_data, tx_data_length);
r14559r14560
830830      case 1: // Paging socket
831831         break;
832832      case 2: // File socket
833//         return file_server(device, rx_data, rx_data_length, tx_data);
833//          return file_server(device, rx_data, rx_data_length, tx_data);
834834         break;
835835      case 3: // NETMAN socket
836836         return netman_server(device, rx_data, rx_data_length, tx_data);
src/mess/machine/c64_epyx_fast_load.c
r14559r14560
8383UINT8 c64_epyx_fast_load_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
8484{
8585   UINT8 data = 0;
86   
86
8787   if (!roml)
8888   {
8989      m_exrom = 0;
9090      m_exrom_timer->adjust(attotime::from_usec(TIMER_PERIOD), 0);
91     
91
9292      data = m_roml[offset & 0x1fff];
9393   }
9494   else if (!io1)
src/mess/machine/c64_super_games.c
r14559r14560
6262UINT8 c64_super_games_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6363{
6464   UINT8 data = 0;
65   
65
6666   if (!roml || !romh)
6767   {
6868      offs_t addr = (m_bank << 14) | (offset & 0x3fff);
r14559r14560
8282   if (!io2)
8383   {
8484      m_bank = data & 0x03;
85     
85
8686      m_game = BIT(data, 2);
8787      m_exrom = BIT(data, 3);
8888   }
src/mess/machine/c64_super_games.h
r14559r14560
4040   // device_c64_expansion_card_interface overrides
4141   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4242   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
43   
43
4444private:
4545   UINT8 m_bank;
4646};
src/mess/machine/pc1251.c
r14559r14560
9696   UINT8 *ram = machine.region("maincpu")->base() + 0x8000;
9797   UINT8 *cpu = sc61860_internal_ram(main_cpu);
9898
99   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);   
99   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);
100100   machine.device<nvram_device>("ram_nvram")->set_base(ram, 0x4800);
101101}
102102
src/mess/machine/c64_dela_ep7x8.c
r14559r14560
9999void c64_dela_ep7x8_cartridge_device::device_start()
100100{
101101   m_rom = subregion("rom")->base();
102   
102
103103   // state saving
104104   save_item(NAME(m_bank));
105105}
r14559r14560
123123UINT8 c64_dela_ep7x8_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
124124{
125125   UINT8 data = 0;
126   
126
127127   if (!roml)
128128   {
129129      offs_t addr = offset & 0x1fff;
130     
130
131131      if (!BIT(m_bank, 0)) data |= m_roml[addr];
132132      if (!BIT(m_bank, 1)) data |= m_rom[0x2000 + addr];
133133      if (!BIT(m_bank, 2)) data |= m_rom[0x4000 + addr];
r14559r14560
151151   if (!io1)
152152   {
153153      m_bank = data;
154     
154
155155      m_exrom = (data == 0xff);
156156   }
157157}
src/mess/machine/c64_dela_ep7x8.h
r14559r14560
4646   // device_c64_expansion_card_interface overrides
4747   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4848   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
49   
49
5050private:
5151   UINT8 *m_rom;
52   
52
5353   UINT8 m_bank;
5454};
5555 
src/mess/machine/c64_structured_basic.c
r14559r14560
6464UINT8 c64_structured_basic_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
6565{
6666   UINT8 data = 0;
67   
67
6868   if (!roml)
6969   {
7070      offs_t addr = (m_bank << 13) | (offset & 0x1fff);
71     
71
7272      data = m_roml[addr];
7373   }
7474 
r14559r14560
9191         m_exrom = 0;
9292         m_bank = 0;
9393         break;
94     
94
9595      case 2:
9696         m_exrom = 0;
9797         m_bank = 1;
src/mess/machine/c64_structured_basic.h
r14559r14560
4141   // device_c64_expansion_card_interface overrides
4242   virtual UINT8 c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2);
4343   virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int roml, int romh, int io1, int io2);
44   
44
4545private:
4646   UINT8 m_bank;
4747};
src/mess/machine/omti8621.c
r14559r14560
359359
360360   if (lun > OMTI_MAX_LUN) {
361361      sense_code = OMTI_SENSE_CODE_DRIVE_NOT_READY;
362   } else    if (!disk->image->exists()) {
362   } else   if (!disk->image->exists()) {
363363      sense_code = OMTI_SENSE_CODE_DRIVE_NOT_READY;
364   } else    if (sector >= OMTI_MAX_BLOCK_COUNT) {
364   } else   if (sector >= OMTI_MAX_BLOCK_COUNT) {
365365      sense_code = OMTI_SENSE_CODE_ILLEGAL_ADDRESS | OMTI_SENSE_CODE_ADDRESS_VALID;
366366   } else if (head >= disk->heads) {
367367      sense_code = OMTI_SENSE_CODE_ILLEGAL_ADDRESS | OMTI_SENSE_CODE_ADDRESS_VALID;
r14559r14560
627627      default:
628628         logerror("!!! Unexpected Command !!!");
629629      }
630//      logerror(" (%02x, length=%02x)", cdb[0], cdb_length);
630//      logerror(" (%02x, length=%02x)", cdb[0], cdb_length);
631631      for (i = 0; i < cdb_length; i++) {
632632         logerror(" %02x", cdb[i]);
633633      }
r14559r14560
823823   }
824824
825825   if (state->mask_port & OMTI_MASK_INTE) {
826//      if (state->omti_state != OMTI_STATE_STATUS) {
827//         LOG(("do_command: UNEXPECTED omti_state %02x",state->omti_state));
828//      }
826//      if (state->omti_state != OMTI_STATE_STATUS) {
827//          LOG(("do_command: UNEXPECTED omti_state %02x",state->omti_state));
828//      }
829829      state->status_port |= OMTI_STATUS_IREQ;
830830      if (command_duration == 0) {
831831         set_interrupt(state, ASSERT_LINE);
r14559r14560
10111011      // omit excessive logging
10121012      if (data != last_data) {
10131013         LOG2(("reading OMTI 8621 Status Register at offset %02x = %02x", offset, data));
1014//         last_data = data;
1014//          last_data = data;
10151015      }
10161016      break;
10171017
r14559r14560
12561256
12571257   if (disk->image->image_core_file() == NULL)
12581258   {
1259       DLOG1(("device_start_omti_disk: no disk"));
1259      DLOG1(("device_start_omti_disk: no disk"));
12601260   }
12611261   else
12621262   {
1263       DLOG1(("device_start_omti_disk: with disk image %s",disk->image->basename() ));
1263      DLOG1(("device_start_omti_disk: with disk image %s",disk->image->basename() ));
12641264   }
12651265
12661266   // default disk type
r14559r14560
13221322   {
13231323      /* --- the following bits of info are returned as 64-bit signed integers --- */
13241324      case DEVINFO_INT_TOKEN_BYTES:         info->i = sizeof(disk_data);      break;
1325      case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = 0;          break;
1325      case DEVINFO_INT_INLINE_CONFIG_BYTES:   info->i = 0;         break;
13261326      case DEVINFO_INT_IMAGE_TYPE:         info->i = IO_HARDDISK;   break;
13271327      case DEVINFO_INT_IMAGE_READABLE:      info->i = 1; break;
13281328      case DEVINFO_INT_IMAGE_WRITEABLE:      info->i = 1; break;
r14559r14560
13321332      case DEVINFO_FCT_START:               info->start = DEVICE_START_NAME(omti_disk); break;
13331333      case DEVINFO_FCT_STOP:               /* Nothing */                        break;
13341334      case DEVINFO_FCT_RESET:               info->reset = DEVICE_RESET_NAME(omti_disk); break;
1335//      case DEVINFO_FCT_IMAGE_LOAD:         info->f = (genf *) DEVICE_IMAGE_LOAD_NAME(omti_disk); break;
1336//      case DEVINFO_FCT_IMAGE_UNLOAD:         info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME(omti_disk); break;
1335//      case DEVINFO_FCT_IMAGE_LOAD:            info->f = (genf *) DEVICE_IMAGE_LOAD_NAME(omti_disk); break;
1336//      case DEVINFO_FCT_IMAGE_UNLOAD:          info->f = (genf *) DEVICE_IMAGE_UNLOAD_NAME(omti_disk); break;
13371337      case DEVINFO_FCT_IMAGE_CREATE:         info->f = (genf *)DEVICE_IMAGE_CREATE_NAME(omti_disk);   break;
13381338
13391339
src/mess/machine/c64_super_explode.c
r14559r14560
8888UINT8 c64_super_explode_cartridge_device::c64_cd_r(address_space &space, offs_t offset, int roml, int romh, int io1, int io2)
8989{
9090   UINT8 data = 0;
91   
91
9292   if (!roml)
9393   {
9494      m_exrom = 0;
9595      m_exrom_timer->adjust(attotime::from_usec(TIMER_PERIOD), 0);
96     
96
9797      data = m_roml[(m_bank << 13) | (offset & 0x1fff)];
9898   }
9999   else if (!io1)
src/mess/video/isa_svga_cirrus.c
r14559r14560
7878   m_isa->install_device(0x03b0, 0x03bf, 0, 0, FUNC(vga_port_03b0_r), FUNC(vga_port_03b0_w));
7979   m_isa->install_device(0x03c0, 0x03cf, 0, 0, FUNC(vga_port_03c0_r), FUNC(vga_port_03c0_w));
8080   m_isa->install_device(0x03d0, 0x03df, 0, 0, FUNC(vga_port_03d0_r), FUNC(vga_port_03d0_w));
81//   m_isa->install_device(0x9ae8, 0x9aeb, 0, 0, FUNC(s3_port_9ae8_r), FUNC(s3_port_9ae8_w));
81//  m_isa->install_device(0x9ae8, 0x9aeb, 0, 0, FUNC(s3_port_9ae8_r), FUNC(s3_port_9ae8_w));
8282
8383   m_isa->install_memory(0xa0000, 0xbffff, 0, 0, FUNC(vga_mem_r), FUNC(vga_mem_w));
8484}
src/mess/video/apollo.c
r14559r14560
145145   UINT8 diffs = screen_data->cr1 ^ data;
146146   screen_data->cr1 = data;
147147
148//   if (screen_data->cr1 & CR1_SYNC_EN) {
149//      // normal mode
150//   } else
148//  if (screen_data->cr1 & CR1_SYNC_EN) {
149//      // normal mode
150//  } else
151151
152152   if ((screen_data->cr1 & CR1_RESET) == 0) {
153153      if (diffs & CR1_RESET) {
r14559r14560
272272
273273         if ((screen_data->cr1 & CR1_DISP_EN) == 0) {
274274            screen_data->status_register &= ~SR_V_DATA;
275         }else          {
275         }else         {
276276            UINT16 pixel = screen_data->image_memory[screen_data->data_clock / 16]
277277                        & (0x8000 >> (screen_data->data_clock % 16));
278278            pixel = (pixel ? 1 : 0)   ^ ((screen_data->cr1 & CR1_INV) ? 0 : 1);
r14559r14560
734734      MCFG_DEFAULT_LAYOUT( layout_apollo )
735735      MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER)
736736      MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
737//      MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
737//      MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
738738      MCFG_PALETTE_LENGTH(2)
739739      MCFG_PALETTE_INIT(black_and_white)
740740      // dot clock, htotal, hstart, hend, vtotal, vstart, vend
r14559r14560
751751      MCFG_DEFAULT_LAYOUT( layout_apollo_15i )
752752      MCFG_SCREEN_ADD(VIDEO_SCREEN_TAG, RASTER)
753753      MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK)
754//      MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
754//      MCFG_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
755755      MCFG_PALETTE_LENGTH(2)
756756      MCFG_PALETTE_INIT(black_and_white)
757757      // dot clock, htotal, hstart, hend, vtotal, vstart, vend
r14559r14560
778778   /* allocate the memory image */
779779   screen_data->image_memory_size = screen_data->buffer_height
780780         * screen_data->buffer_width / 16;
781//   screen_data->image_memory = (UINT16 *) malloc(screen_data->image_memory_size * 2);
781//  screen_data->image_memory = (UINT16 *) malloc(screen_data->image_memory_size * 2);
782782   screen_data->image_memory = auto_alloc_array(device->machine(), UINT16, screen_data->image_memory_size);
783783   assert(screen_data->image_memory != NULL);
784784
src/mess/video/avigo.c
r14559r14560
7171   /* allocate video memory */
7272   m_video_memory = machine().region_alloc( "videoram", (AVIGO_SCREEN_WIDTH>>3) * AVIGO_SCREEN_HEIGHT + 1, 1, ENDIANNESS_LITTLE )->base();
7373   memset(m_video_memory, 0, (AVIGO_SCREEN_WIDTH>>3) * AVIGO_SCREEN_HEIGHT + 1);
74   
74
7575   save_pointer(NAME(m_video_memory), (AVIGO_SCREEN_WIDTH>>3) * AVIGO_SCREEN_HEIGHT + 1);
7676}
7777
src/mess/includes/next.h
r14559r14560
113113   void mo_irq(bool state);
114114   void mo_drq(bool state);
115115
116   //   static const SCSIConfigTable scsi_devices;
116   //  static const SCSIConfigTable scsi_devices;
117117   static const floppy_format_type floppy_formats[];
118118   static const cdrom_interface cdrom_intf;
119119   static const harddisk_interface harddisk_intf;
src/mess/includes/apollo.h
r14559r14560
8989class apollo_state : public driver_device
9090{
9191public:
92//   apollo_state(running_machine &machine, const driver_device_config_base &config)
93//      : driver_device(machine, config) { }
92//  apollo_state(running_machine &machine, const driver_device_config_base &config)
93//      : driver_device(machine, config) { }
9494
9595   apollo_state(const machine_config &mconfig, device_type type, const char *tag)
9696         : driver_device(mconfig, type, tag) { }
src/mess/includes/avigo.h
r14559r14560
4444   void refresh_memory(UINT8 bank, UINT8 chip_select);
4545   void refresh_ints();
4646   void nvram_init(nvram_device &nvram, void *base, size_t size);
47   
47
4848   DECLARE_WRITE_LINE_MEMBER( tc8521_alarm_int );
4949   DECLARE_WRITE_LINE_MEMBER( com_interrupt );
5050
src/mess/mess.mak
r14559r14560
614614$(MESSOBJ)/apf.a:            \
615615   $(MESS_DRIVERS)/apf.o      \
616616
617$(MESSOBJ)/apollo.a:           \
618   $(MESS_DRIVERS)/apollo.o      \
619   $(MESS_VIDEO)/apollo.o      \
620   $(MESS_MACHINE)/sc499.o      \
617$(MESSOBJ)/apollo.a:         \
618   $(MESS_DRIVERS)/apollo.o   \
619   $(MESS_VIDEO)/apollo.o     \
620   $(MESS_MACHINE)/sc499.o    \
621621   $(MESS_MACHINE)/omti8621.o  \
622622   $(MESS_MACHINE)/apollo_dbg.o  \
623623   $(MESS_MACHINE)/apollo_eth.o  \
src/mess/drivers/pocketc.c
r14559r14560
801801   UINT8 *ram = machine.region("maincpu")->base() + 0x4000;
802802   UINT8 *cpu = sc61860_internal_ram(main_cpu);
803803
804   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);   
804   machine.device<nvram_device>("cpu_nvram")->set_base(cpu, 96);
805805   machine.device<nvram_device>("ram_nvram")->set_base(ram, 0x2800);
806806}
807807
src/mess/drivers/ip22.c
r14559r14560
15221522   // SCSI init
15231523   wd33c93_init(machine, &scsi_intf);
15241524   machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(ip225015_exit),&machine));
1525   
1526   machine.device<nvram_device>("nvram_user")->set_base(state->m_RTC.nUserRAM, 0x200);   
1527   machine.device<nvram_device>("nvram")->set_base(state->m_RTC.nRAM, 0x200);   
1525
1526   machine.device<nvram_device>("nvram_user")->set_base(state->m_RTC.nUserRAM, 0x200);
1527   machine.device<nvram_device>("nvram")->set_base(state->m_RTC.nRAM, 0x200);
15281528}
15291529
15301530static DRIVER_INIT( ip225015 )
r14559r14560
16651665
16661666   MCFG_MACHINE_START( ip225015 )
16671667   MCFG_MACHINE_RESET( ip225015 )
1668   
1668
16691669   MCFG_NVRAM_ADD_0FILL("nvram")
16701670   MCFG_NVRAM_ADD_0FILL("nvram_user")
16711671
src/mess/drivers/pce220.c
r14559r14560
853853   memory_configure_bank(machine(), "bank4", 0, 8, rom, 0x4000);
854854
855855   m_vram = (UINT8*)machine().region("lcd_vram")->base();
856   
857   machine().device<nvram_device>("nvram")->set_base(ram, m_ram->size());   
856
857   machine().device<nvram_device>("nvram")->set_base(ram, m_ram->size());
858858}
859859
860860void pcg850v_state::machine_start()
r14559r14560
868868   memory_configure_bank(machine(), "bank4", 0, 22, rom, 0x4000);
869869
870870   m_vram = (UINT8*)machine().region("lcd_vram")->base();
871   machine().device<nvram_device>("nvram")->set_base(ram, m_ram->size());   
871   machine().device<nvram_device>("nvram")->set_base(ram, m_ram->size());
872872}
873873
874874void pce220_state::machine_reset()
src/mess/drivers/next.c
r14559r14560
44
55    TODO:
66
7   - Find out why the pager doesn't work on the mach_init loading
8     task (yes, that's the big one)
7    - Find out why the pager doesn't work on the mach_init loading
8      task (yes, that's the big one)
99
10   - Hook up the mouse (not before the system boots though, see the first problem)
10    - Hook up the mouse (not before the system boots though, see the first problem)
1111
12   - Fix the kernel bitching at boot (non-volatile memory readback error)
12    - Fix the kernel bitching at boot (non-volatile memory readback error)
1313
14   - Hook up the sound output, it seems to be shared with the keyboard port somehow
14    - Hook up the sound output, it seems to be shared with the keyboard port somehow
1515
16   - Implement more of the scc and its dma interactions so that the
17     start up test passes, but not before sound out is done (if the scc
18     test passes all the other test pass up to sound out which
19     infloops)
16    - Implement more of the scc and its dma interactions so that the
17      start up test passes, but not before sound out is done (if the scc
18      test passes all the other test pass up to sound out which
19      infloops)
2020
21   - Really implement the MO, it's only faking it for the startup test right now
21    - Really implement the MO, it's only faking it for the startup test right now
2222
23   - Find out why netbsd goes to hell even before loading the kernel
23    - Find out why netbsd goes to hell even before loading the kernel
2424
2525    Memory map and other bits can be found here:
2626    http://fxr.watson.org/fxr/source/arch/next68k/include/cpu.h?v=NETBSD5#L366
r14559r14560
164164        ---- ---- ---- ---- ---- ---- ---x x--- mem speed
165165        ---- ---- ---- ---- ---- ---- ---- -xxx cpu speed 16/20/25/33/40/50/66/80
166166
167   machine types:
168   0 NeXT_CUBE
169   1 NeXT_WARP9
170   2 NeXT_X15
171   3 NeXT_WARP9C
172   4 NeXT_Turbo
173   5 NeXT_TurboC
174   6 Unknown
175   7 Unknown
176   8 NeXT_TurboCube
177   9 NeXT_TurboCubeC
167    machine types:
168    0 NeXT_CUBE
169    1 NeXT_WARP9
170    2 NeXT_X15
171    3 NeXT_WARP9C
172    4 NeXT_Turbo
173    5 NeXT_TurboC
174    6 Unknown
175    7 Unknown
176    8 NeXT_TurboCube
177    9 NeXT_TurboCubeC
178178
179179        68040-25: 00011102
180180        68040-25: 00013002 (non-turbo, color)
r14559r14560
623623   // The rom strangely can't boot on anything else than ED, it has
624624   // code for the other densities but forces ED for some mysterious
625625   // reason.  The kernel otoh behaves as expected.
626   
626
627627   if(fdc) {
628628      floppy_image_device *fdev = machine().device<floppy_connector>(":fd0")->get_device();
629629      if(fdev->exists()) {
r14559r14560
11311131
11321132/* Driver */
11331133
1134/*    YEAR  NAME     PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY                 FULLNAME                     FLAGS */
1134/*    YEAR  NAME     PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY                 FULLNAME                      FLAGS */
11351135COMP( 1987, next,    0,      0,       next,      next,    next,    "Next Software Inc",   "NeXT Cube",               GAME_NOT_WORKING | GAME_NO_SOUND)
11361136COMP( 1990, nexts,   0,      0,       nexts,     next,    nexts,   "Next Software Inc",   "NeXTstation",            GAME_NOT_WORKING | GAME_NO_SOUND)
11371137COMP( 1990, nexts2,  nexts,  0,       nexts2,    next,    nexts2,  "Next Software Inc",   "NeXTstation (X15 variant)",   GAME_NOT_WORKING | GAME_NO_SOUND)
r14559r14560
11431143
11441144      /*
11451145
1146   UINT32 *rom = (UINT32 *)(machine.region("user1")->base());
1147   rom[0x3f48/4] = 0x2f017000; // memory test funcall
1148   rom[0x3f4c/4] = 0x4e712400;
1149   rom[0x00b8/4] = 0x001a4e71; // rom checksum
1150   rom[0x00bc/4] = 0x4e714e71;
1146    UINT32 *rom = (UINT32 *)(machine.region("user1")->base());
1147    rom[0x3f48/4] = 0x2f017000; // memory test funcall
1148    rom[0x3f4c/4] = 0x4e712400;
1149    rom[0x00b8/4] = 0x001a4e71; // rom checksum
1150    rom[0x00bc/4] = 0x4e714e71;
11511151
11521152v74
1153   UINT32 *rom = (UINT32 *)(machine.region("user1")->base());
1154   rom[0x329c/4] = 0x70004e71; // memory test funcall
1155   rom[0x32a0/4] = 0x4e712400;
1156   rom[0x03f8/4] = 0x001a4e71; // rom checksum
1157   rom[0x03fc/4] = 0x4e714e71;
1158      */
1153    UINT32 *rom = (UINT32 *)(machine.region("user1")->base());
1154    rom[0x329c/4] = 0x70004e71; // memory test funcall
1155    rom[0x32a0/4] = 0x4e712400;
1156    rom[0x03f8/4] = 0x001a4e71; // rom checksum
1157    rom[0x03fc/4] = 0x4e714e71;
1158        */
src/mess/drivers/apollo.c
r14559r14560
66 *
77 *  Released for general non-commercial use under the MAME license
88 *  Visit http://mamedev.org for licensing and usage restrictions.
9 *
9 *
1010 *  Adapted February 19, 2012 for general MAME/MESS standards by R. Belmont
11 *
11 *
1212 *  TODO: use MESS ram device and MCFG_RAM_* to handle RAM sizing.
1313 *        AT bus stuff indicates ISA compatibility?  If so, convert to use MESS ISA bus infrastructure, including 3c505?
1414 *        Remove need for instruction hook.
1515 *        Convert to modern address map.
16 *
16 *
1717 *  see also:
1818 *  - Domain Series 3000/Series 4000 Hardware Architecture Handbook (Order No. 007861 Rev. 02)
1919 *  - Domain Personal Workstations and Servers Technical Reference (Apollo Order No. 008778-A01)
r14559r14560
153153
154154/*void apollo_set_cpu_has_fpu(device_t *device, int onoff)
155155{
156   if (device == NULL || (device->type() != M68020PMMU && device->type() != M68030))
157   {
158      DLOG1(("set_cpu_has_fpu: unexpected CPU device"));
159   }
160   else
161   {
162      m68ki_cpu_core *cpu = (m68ki_cpu_core *) downcast<legacy_cpu_device *> (device)->token();
163      cpu->has_fpu = onoff;
164      DLOG1(("set_cpu_has_fpu: FPU has been %s", onoff ? "enabled" : "disabled"));
165   }
156    if (device == NULL || (device->type() != M68020PMMU && device->type() != M68030))
157    {
158        DLOG1(("set_cpu_has_fpu: unexpected CPU device"));
159    }
160    else
161    {
162        m68ki_cpu_core *cpu = (m68ki_cpu_core *) downcast<legacy_cpu_device *> (device)->token();
163        cpu->has_fpu = onoff;
164        DLOG1(("set_cpu_has_fpu: FPU has been %s", onoff ? "enabled" : "disabled"));
165    }
166166}*/
167167
168168/***************************************************************************
r14559r14560
240240
241241   // check for NULLPROC:
242242   // 027C F8FF AND.W #F8FF,SR
243   // 60FA        BRA *-4
243   // 60FA      BRA *-4
244244
245245   if ((next_ir == 0x60fa && last_ir == 0x027c) || (next_ir == 0x027c   && last_ir == 0x60fa))
246246   {
r14559r14560
465465
466466      if (apollo_csr_get_control_register() & APOLLO_CSR_CR_INTERRUPT_ENABLE) {
467467         // force parity error (if NMI is enabled)
468//         cpu_set_input_line_and_vector(&space->device(), 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
468//          cpu_set_input_line_and_vector(&space->device(), 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
469469         cputag_set_input_line_and_vector(space->machine(), MAINCPU, 7, ASSERT_LINE, M68K_INT_ACK_AUTOVECTOR);
470470
471471      }
r14559r14560
487487
488488      parity_error_offset = offset;
489489
490//      SLOG1(("memory dword write with parity to %08x = %08x & %08x parity_byte=%04x",
491//            ram_base_address +offset * 4, data, mem_mask, parity_error_byte_mask));
490//      SLOG1(("memory dword write with parity to %08x = %08x & %08x parity_byte=%04x",
491//              ram_base_address +offset * 4, data, mem_mask, parity_error_byte_mask));
492492
493493      if (parity_error_handler_is_installed == 0) {
494494         // no more than 192 read/write handlers may be used
r14559r14560
518518 DN3000/DN3500 unmapped memory
519519 ***************************************************************************/
520520
521static READ32_HANDLER( apollo_unmapped_r )
521static READ32_HANDLER( apollo_unmapped_r )
522522{
523523   offs_t address = offset * 4;
524524
r14559r14560
542542      SLOG1(("unmapped memory dword read from %08x with mask %08x (ir=%04x)", address , mem_mask, m68k->ir));
543543   }
544544
545//   if (address == 0xfffffffc) {
546//      // temporary hack for disp7d.dex @ 010456D8
547//      return    0xffffffff;
548//   }
545//  if (address == 0xfffffffc) {
546//      // temporary hack for disp7d.dex @ 010456D8
547//      return  0xffffffff;
548//  }
549549   /* unmapped; access causes a bus error */
550550   apollo_bus_error(space->machine());
551551
552552   return 0xffffffff;
553553}
554554
555static WRITE32_HANDLER( apollo_unmapped_w )
555static WRITE32_HANDLER( apollo_unmapped_w )
556556{
557557   SLOG(("unmapped memory dword write to %08x = %08x & %08x", offset * 4, data, mem_mask));
558558
r14559r14560
564564 DN3000/DN3500 ROM write
565565 ***************************************************************************/
566566
567static WRITE32_HANDLER( apollo_rom_w )
567static WRITE32_HANDLER( apollo_rom_w )
568568{
569569   offs_t address =  offset * 4;
570570   offs_t pc = cpu_get_previouspc(&space->device());
r14559r14560
609609
610610   // set bit AT-Compatible I/O Timeout in CPU Status Register
611611   // Note: should be set for broken hardware only
612   // apollo_csr_set_status_register(APOLLO_CSR_SR_ATBUS_IO_TIMEOUT,   APOLLO_CSR_SR_ATBUS_IO_TIMEOUT);
612   // apollo_csr_set_status_register(APOLLO_CSR_SR_ATBUS_IO_TIMEOUT,   APOLLO_CSR_SR_ATBUS_IO_TIMEOUT);
613613   return data;
614614}
615615
r14559r14560
641641
642642   // set bit AT-Compatible I/O Timeout in CPU Status Register
643643   // Note: should be set for broken hardware only
644   // apollo_csr_set_status_register(APOLLO_CSR_SR_ATBUS_IO_TIMEOUT,   APOLLO_CSR_SR_ATBUS_IO_TIMEOUT);
644   // apollo_csr_set_status_register(APOLLO_CSR_SR_ATBUS_IO_TIMEOUT,   APOLLO_CSR_SR_ATBUS_IO_TIMEOUT);
645645}
646646
647647/***************************************************************************
r14559r14560
782782
783783      AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w)
784784
785//      AM_RANGE(0x03020000, 0x0303ffff) Cache Tag Store (DN4500 only)
786//      AM_RANGE(0x04000000, 0x0400ffff) Cache Tag Data (DN4500 only)
787//      AM_RANGE(0x0e000000, 0x0fffffff) FPA address space
785//      AM_RANGE(0x03020000, 0x0303ffff) Cache Tag Store (DN4500 only)
786//      AM_RANGE(0x04000000, 0x0400ffff) Cache Tag Data (DN4500 only)
787//      AM_RANGE(0x0e000000, 0x0fffffff) FPA address space
788788
789//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
789//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
790790      AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w)
791791ADDRESS_MAP_END
792792
r14559r14560
817817      AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8( APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff)
818818      AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8( apollo_fdc_r, apollo_fdc_w, 0xffffffff)
819819
820//      AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff)
821//      AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff)
820//      AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff)
821//      AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff)
822822
823823      AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff)
824824
r14559r14560
830830
831831      AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w)
832832
833//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
833//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
834834      AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w)
835835ADDRESS_MAP_END
836836
r14559r14560
894894      AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8( APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff)
895895      AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8( apollo_fdc_r, apollo_fdc_w, 0xffffffff)
896896
897//      AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff)
898//      AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff)
897//      AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff)
898//      AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff)
899899
900900      AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff)
901901
r14559r14560
953953
954954      AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w)
955955
956//      AM_RANGE(0x03020000, 0x0303ffff) Cache Tag Store (DN4500 only)
957//      AM_RANGE(0x04000000, 0x0400ffff) Cache Tag Data (DN4500 only)
956//      AM_RANGE(0x03020000, 0x0303ffff) Cache Tag Store (DN4500 only)
957//      AM_RANGE(0x04000000, 0x0400ffff) Cache Tag Data (DN4500 only)
958958      AM_RANGE(0x07000000, 0x0700FFFF) AM_READWRITE8( dn5500_io_protection_map_r, dn5500_io_protection_map_w, 0xffffffff )
959//      AM_RANGE(0x0e000000, 0x0fffffff) FPA address space
959//      AM_RANGE(0x0e000000, 0x0fffffff) FPA address space
960960
961//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
961//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
962962      AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w)
963963ADDRESS_MAP_END
964964
r14559r14560
992992      AM_RANGE(0x058000, 0x058007) AM_DEVREADWRITE8( APOLLO_ETH_TAG, threecom3c505_r, threecom3c505_w, 0xffffffff)
993993      AM_RANGE(0x05f800, 0x05f807) AM_READWRITE8( apollo_fdc_r, apollo_fdc_w, 0xffffffff)
994994
995//      AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff)
996//      AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff)
995//      AM_RANGE(0x05d800, 0x05dc07) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mcr_r, apollo_mcr_w, 0xffffffff)
996//      AM_RANGE(0xfa0000, 0xfdffff) AM_DEVREADWRITE16( APOLLO_SCREEN_TAG, apollo_mgm_r, apollo_mgm_w, 0xffffffff)
997997
998998      AM_RANGE(ATBUS_IO_BASE, ATBUS_IO_END) AM_READWRITE16(apollo_atbus_io_r, apollo_atbus_io_w, 0xffffffff)
999999
r14559r14560
10051005      AM_RANGE(ATBUS_MEMORY_BASE, ATBUS_MEMORY_END) AM_READWRITE(apollo_atbus_memory_r, apollo_atbus_memory_w)
10061006
10071007      AM_RANGE(0x07000000, 0x0700FFFF) AM_READWRITE8( dn5500_io_protection_map_r, dn5500_io_protection_map_w, 0xffffffff )
1008//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
1008//      AM_RANGE(0xf8000000, 0xffffffff) AM_READWRITE(apollo_f8_r, apollo_f8_w)
10091009      AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(apollo_unmapped_r, apollo_unmapped_w)
10101010ADDRESS_MAP_END
10111011
r14559r14560
10131013 Machine Reset
10141014 ***************************************************************************/
10151015
1016static MACHINE_RESET( dn3500 )
1016static MACHINE_RESET( dn3500 )
10171017{
10181018   device_t *cpu = machine.device(MAINCPU);
10191019
r14559r14560
10481048    m68k_set_instruction_hook(cpu, apollo_instruction_hook);
10491049}
10501050
1051static void apollo_reset_instr_callback(device_t *device)
1051static void apollo_reset_instr_callback(device_t *device)
10521052{
10531053   DLOG1(("apollo_reset_instr_callback"));
10541054   // FIXME: this will reset the CPU too
1055//   device->machine().schedule_soft_reset();    // needs to call reset on the devices other than the CPU
1055//  device->machine().schedule_soft_reset();    // needs to call reset on the devices other than the CPU
10561056}
10571057
10581058/***************************************************************************
r14559r14560
11471147
11481148static WRITE8_DEVICE_HANDLER( apollo_kbd_putchar ) {
11491149   // put keyboard character to the keyboard sio
1150//   DLOG1(("apollo_kbd_putchar: 0x%02x", data));
1150//  DLOG1(("apollo_kbd_putchar: 0x%02x", data));
11511151   apollo_sio_rx_data(device->machine().device(APOLLO_SIO_TAG), 0, data);
11521152}
11531153
r14559r14560
12121212   MCFG_CPU_PROGRAM_MAP(dsp3500_map)
12131213   /* terminal hardware */
12141214   MCFG_DEFAULT_LAYOUT( layout_apollo_dsp )
1215//   MCFG_FRAGMENT_ADD( generic_terminal )
1215//  MCFG_FRAGMENT_ADD( generic_terminal )
12161216   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, apollo_terminal_config)
12171217MACHINE_CONFIG_END
12181218
r14559r14560
12471247   MCFG_CPU_PROGRAM_MAP(dsp3000_map)
12481248   /* terminal hardware */
12491249   MCFG_DEFAULT_LAYOUT( layout_apollo_dsp )
1250//   MCFG_FRAGMENT_ADD( generic_terminal )
1250//  MCFG_FRAGMENT_ADD( generic_terminal )
12511251   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, apollo_terminal_config)
12521252MACHINE_CONFIG_END
12531253
r14559r14560
12771277   MCFG_CPU_PROGRAM_MAP(dsp5500_map)
12781278   /* terminal hardware */
12791279   MCFG_DEFAULT_LAYOUT( layout_apollo_dsp )
1280//   MCFG_FRAGMENT_ADD( generic_terminal )
1280//  MCFG_FRAGMENT_ADD( generic_terminal )
12811281   MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, apollo_terminal_config)
12821282MACHINE_CONFIG_END
12831283
src/mess/drivers/n64.c
r14559r14560
342342ROM_END
343343
344344CONS(1996, n64,    0,      0,      n64,   n64,   0,   "Nintendo", "Nintendo 64", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
345CONS(1996, n64dd,    n64,   0,      n64dd,   n64,   0,   "Nintendo", "Nintendo 64DD", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
345CONS(1996, n64dd,   n64,   0,      n64dd,   n64,   0,   "Nintendo", "Nintendo 64DD", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS )
src/mess/drivers/ibmpc.c
r14559r14560
323323DEVICE_INPUT_DEFAULTS_END
324324
325325//static DEVICE_INPUT_DEFAULTS_START(ega)
326//   DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00)
326//  DEVICE_INPUT_DEFAULTS("DSW0",0x30, 0x00)
327327//DEVICE_INPUT_DEFAULTS_END
328328
329329static SLOT_INTERFACE_START(ibm_isa8_cards)
src/mess/drivers/avigo.c
r14559r14560
268268   m_flashes[0] = machine().device<intelfsh8_device>("flash0");
269269   m_flashes[1] = machine().device<intelfsh8_device>("flash1");
270270   m_flashes[2] = machine().device<intelfsh8_device>("flash2");
271   
271
272272   machine().device<nvram_device>("nvram")->set_base(m_ram_base, m_ram->size());
273273   m_warm_start = 1;
274   
274
275275   // register for state saving
276276   save_item(NAME(m_key_line));
277277   save_item(NAME(m_irq));
src/mess/drivers/c64.c
r14559r14560
33    TODO:
44
55    - 64C PLA dump
6   - clean up inputs
7   - Multiscreen crashes on boot
8   
9      805A: lda  $01
10      805C: and  #$FE
11      805E: sta  $01
12      8060: m6502_brk#$00 <-- BOOM!
6    - clean up inputs
7    - Multiscreen crashes on boot
138
9        805A: lda  $01
10        805C: and  #$FE
11        805E: sta  $01
12        8060: m6502_brk#$00 <-- BOOM!
13
1414*/
1515
1616#include "includes/c64.h"
r14559r14560
8585{
8686   int io1 = 1;
8787   int io2 = 1;
88   
88
8989   UINT8 data = 0;
9090
9191   if (!casram)
r14559r14560
139139         case 2: // I/O1
140140            io1 = 0;
141141            break;
142           
142
143143         case 3: // I/O2
144144            io2 = 0;
145145            break;
r14559r14560
147147         break;
148148      }
149149   }
150   
150
151151   data |= m_exp->cd_r(space, offset, roml, romh, io1, io2);
152152
153153   return data;
r14559r14560
180180   int casram, basic, kernal, charom, grw, io, roml, romh;
181181
182182   bankswitch(offset, 0, 0, 0, 1, 0, &casram, &basic, &kernal, &charom, &grw, &io, &roml, &romh);
183     
183
184184   if (!casram)
185185   {
186186      m_ram->pointer()[offset] = data;
r14559r14560
223223         break;
224224      }
225225   }
226   
226
227227   m_exp->cd_w(space, offset, data, roml, romh, io1, io2);
228228}
229229
docs/messnew.txt
r14559r14560
10.145
10.145u1
22
33New System Drivers Supported:
44-----------------------------
5Apollo DN3000 15" Monochrome [Hans Ostermeyer]
6Apollo DN3000 19" Monochrome [Hans Ostermeyer]
7Apollo DSP3000 Server [Hans Ostermeyer]
8Apollo DN3500 15" Monochrome [Hans Ostermeyer]
9Apollo DN3500 19" Monochrome [Hans Ostermeyer]
10Apollo DSP3500 Server [Hans Ostermeyer]
11Apollo DN5500 15" Monochrome [Hans Ostermeyer]
12Apollo DN5500 19" Monochrome [Hans Ostermeyer]
13Apollo DSP5500 Server [Hans Ostermeyer]
5- Apollo DN3000 15" Monochrome [Hans Ostermeyer]
6- Apollo DN3000 19" Monochrome [Hans Ostermeyer]
7- Apollo DSP3000 Server [Hans Ostermeyer]
8- Apollo DN3500 15" Monochrome [Hans Ostermeyer]
9- Apollo DN3500 19" Monochrome [Hans Ostermeyer]
10- Apollo DSP3500 Server [Hans Ostermeyer]
11- Apollo DN5500 15" Monochrome [Hans Ostermeyer]
12- Apollo DN5500 19" Monochrome [Hans Ostermeyer]
13- Apollo DSP5500 Server [Hans Ostermeyer]
1414
1515Systems Promoted from GAME_NOT_WORKING:
1616---------------------------------------
r14559r14560
1818
1919Skeleton drivers:
2020-----------------
21- Sanyo SX-16 [minataku]
22
23System Driver Changes:
24----------------------
25-c64: Added support for the following cartridge types:  [Curt Coder]
26  COMAL 80, Dinamic, Fun Play, GeoRAM, Magic Desk, Mikro Assembler, Ocean,
27  Rex, System 3, Westermann, Zaxxon, Super Games, Epyx Fast Load,
28  Dela EP7x8, Dela EP256, Dela EP64, Rex EP256, Ross, Structured Basic,
29  EasyFlash, StarDOS, Warp Speed, ExOS, MACH5, Magic Formel.
30 - Added support for the Commodore IEEE-488 cartridge. You can now connect any
31   IEEE-488 disk drive to C64 and even another cartridge using the passthru.
32   (e.g. mess c64p -exp ieee488 -exp:ieee488:ieee9 sfd1001 -cart2 congo)
33 - Added support for .CRT cartridge image files. Only standard cartridges
34  (8/16KB) are supported for the moment, soon all will be assimilated.
35
36-lynx: removed game_not_working and game_imperfect_sound flags  [Huygens]
37 fixed sprite scaling bug (fixed blue lightning).
38 Implemented mikey sleep register (viking child, dinolympics timing corrected)
39 Fixed timer value reading bug (used for pseudo random number generation in blockout)
40 Update of layout screen measures approximately 72x46mm (not 4:3)
41
42-next: Normalize the delegates, split the different NeXT variants [O. Galibert]
43 - Handle command-~
44 - Make the floppy work
45-n64: Multithreaded RDP. Speedups of 1.6x to 2.8x have been observed. [Ryan Holtz]
46  - Modified VI_V_INTR_REG and VI_V_CURRENT_LINE_REG actually be treated as half-lines,
47    not full lines. Fixes Rampage: World Tour video.
48  - Modified code to interrupt at the line specified by VI_V_INTR_REG, rather than a
49    fixed 60Hz vblank interrupt.
50  - Doubled the number of available span structs on the stack, fixes crashing in
51    Mario Kart 64, Star Fox 64, and probably others.
52  - Partially fix PIF access, several more games recognize cart SRAM, cart FlashROM,
53    cart EEPROM, and controller paks
54  - Fixed missing text in Super Mario 64 and other games.
55  - Added skeleton 64DD driver. Boots the 64DD IPL, but does not emulate the hardware yet.
56     - User Note: You will need an unmodified 64DD IPL dump. NOT one that has had the
57      first 4K replaced with a CIC-6102 or other game's boot block.
58  - Tweaked MI interrupt handling to guard against interrupts getting "lost"
59  - Hook up 64DD RTC and interrupts. Please insert disc.
60  - Warm reset support.
61  - Get Jet Force Gemini to boot and Ocarina of Time to boot without crashing.
62    - Use bitmap.fill instead of a manual fill when blanking to avoid trashing memory.
63    - Return DP start/end/current/status/clock registers at correct window for RSP to see.
64    - Clear DP clock when requested by writing the right bit in DP_STATUS_REG.
65    - Avoid modifying SP DMA length register during DMA, to return correct reads
66        on SP_RD_LEN and SP_WR_LEN.
67  - Fix Super Smash Bros. booting.
68     - Don't try to call render_triangle_custom if a DrawTriangle command generated no spans.
69  - Include the delay slot when checksumming single-instruction blocks in the MIPS3 and RSP DRCs.
70    Fixes Sim City 2000 (Japan).
71  - Various PIF fixes, gets Command & Conquer to boot and games to recognize and save to controller paks.
72  - Added a trivial Y reject to N64 triangle draw commands. Fixes crashes in both Castlevania games,
73    Virtual Pool, and maybe others.
74-ti99: The Grand TI-99 Family Rewrite, using class structures and modern address maps [Michael Zapf]
75-wswan: converted rotation to core method used by lynx [Huygens]
76 controls are rotated with the console for vertical games
77 buffered sprite table data (fixes pbobble etc.)
78 corrected voice audio mode (voice volume is unsigned not signed)
79-vic20: Cleaned up cartridge interface, and added preliminary .CRT image support. [Curt Coder]
80-next: Add information and correct some about the various next roms [Lord Nightmare]
81-a7800: Added reasonable return values for the TIA collision registers [Dan Boris]
82-hec2hp: Fixed regressions [JJ Stacino]
83
84Software Lists:
85----------------
86-mbc55x.xml: added software list for the Sanyo MBC-550 and MBC-555 systems [Kaylee]
87
88Source Changes:
89----------------
90- ISA Gravis Ultrasound device [Barry Rodewald]
91- Work on et4000 16bbp and 24bbp video modes [Carl]
92- Made generic serial port and RS232 port as slot devices, implemented pc mouse as example device [Carl]
93- 68040 CPU: FSAVE fix, Add correct idle frames, Show the correct virtual map  [O. Galibert]
94- Added basic wrapper for Diamond Multimedia (Cirrus Logic based) ISA SVGA [Kaylee]
95- Added null_modem and serial_terminal as slot devices [Carl]
96- i386: Fix cmpsb (dir /s and edit works now) [Carl]
97
980.145
99
100New System Drivers Supported:
101-----------------------------
102(none)
103
104Systems Promoted from GAME_NOT_WORKING:
105---------------------------------------
106(none)
107
108Skeleton drivers:
109-----------------
21110- Olympia People PC [Robert aka rfka01]
22111
23112System Driver Changes:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team