Previous 15994 Revisions Next

r6799 Monday 28th December, 2009 at 07:33:23 UTC by Phill Harvey-Smith
update for i86 cpu to fix bug with hlt instruction, also submitted to mess
dev team.

update to RM nimbus driver, it will now boot from floppy and the keyboard
now works, though the video is still buggy.
[src/emu/cpu/i86]i286.c i86.c instr86.c
[src/mess/drivers]rmnimbus.c
[src/mess/includes]rmnimbus.h
[src/mess/machine]rmnimbus.c
[src/mess/video]rmnimbus.c

src/emu/cpu/i86/i86.c
r6798r6799
5252   UINT8 rep_in_progress;
5353   INT32 extra_cycles;       /* extra cycles for interrupts */
5454
55    int halted;         /* Is the CPU halted ? */
56   
5557   UINT16 ip;
5658   UINT32 sp;
5759
r6798r6799
183185   state_save_register_device_item(device, 0, cpustate->nmi_state);
184186   state_save_register_device_item(device, 0, cpustate->irq_state);
185187   state_save_register_device_item(device, 0, cpustate->extra_cycles);
188    state_save_register_device_item(device, 0, cpustate->halted);   
186189   state_save_register_device_item(device, 0, cpustate->test_state);   /* PJB 03/05 */
187190   state_save_register_device_item(device, 0, cpustate->rep_in_progress);   /* PJB 03/05 */
188191}
r6798r6799
256259   cpustate->base[CS] = SegBase(CS);
257260   cpustate->pc = 0xffff0 & AMASK;
258261   ExpandFlags(cpustate->flags);
262
263    cpustate->halted=0;
259264}
260265
261266static CPU_EXIT( i8086 )
r6798r6799
267272
268273static void set_irq_line(i8086_state *cpustate, int irqline, int state)
269274{
275   if (state != CLEAR_LINE && cpustate->halted)
276   {
277      cpustate->halted = 0;
278   }
279
270280   if (irqline == INPUT_LINE_NMI)
271281   {
272282      if (cpustate->nmi_state == state)
r6798r6799
275285
276286      /* on a rising edge, signal the NMI */
277287      if (state != CLEAR_LINE)
288        {
278289         PREFIX(_interrupt)(cpustate, I8086_NMI_INT_VECTOR);
279   }
290        }
291    }
280292   else
281293   {
282294      cpustate->irq_state = state;
r6798r6799
297309{
298310   i8086_state *cpustate = get_safe_token(device);
299311
312
313     if (cpustate->halted)
314   {
315        return cycles;
316    }
317
300318   /* copy over the cycle counts if they're not correct */
301319   if (timing.id != 8086)
302320      timing = i8086_cycles;
src/emu/cpu/i86/instr86.c
r6798r6799
27352735#ifndef I80186
27362736static void PREFIX86(_hlt)(i8086_state *cpustate)    /* Opcode 0xf4 */
27372737{
2738   cpustate->pc--;
2738    cpustate->halted=1;
27392739   ICOUNT = 0;
27402740}
27412741
src/emu/cpu/i86/i286.c
r6798r6799
7070   UINT8 rep_in_progress;
7171   INT32    extra_cycles;       /* extra cycles for interrupts */
7272
73    int halted;         /* Is the CPU halted ? */
74
7375   memory_interface   mem;
7476   int icount;
7577   unsigned prefix_base;
r6798r6799
173175
174176   CHANGE_PC(cpustate->pc);
175177
178    cpustate->halted=0;
176179}
177180
178181/****************************************************************************/
r6798r6799
181184
182185static void set_irq_line(i80286_state *cpustate, int irqline, int state)
183186{
187   if (state != CLEAR_LINE && cpustate->halted)
188   {
189      cpustate->halted = 0;
190   }
191
184192   if (irqline == INPUT_LINE_NMI)
185193   {
186194      if (cpustate->nmi_state == state)
r6798r6799
205213{
206214   i80286_state *cpustate = get_safe_token(device);
207215
216     if (cpustate->halted)
217   {
218        return cycles;
219    }
220
208221   /* copy over the cycle counts if they're not correct */
209222   if (timing.id != 80286)
210223      timing = i80286_cycles;
src/mess/video/rmnimbus.c
r6798r6799
116116     
117117    vaddr=(BYTES_PER_LINE*y)+(x / ppb);
118118    pixel_offset=(x % ppb);
119    last=video_mem[vaddr];
119    last=(vaddr<VRAM_SIZE) ? video_mem[vaddr] : 0
120     
121    ;
120122    colour=on_off ? (reg024&0x0F) : ((reg024&0xF0)>>4);
121123     
122124    if(bpp==2)
r6798r6799
134136        lshifts=4-rshifts;         
135137    }
136138     
137    if(reg022 & XOR_MASK)
138        video_mem[vaddr]=(video_mem[vaddr] & mask) ^ (colour<<(lshifts)); 
139    if(vaddr<VRAM_SIZE)
140    {
141        if(reg022 & XOR_MASK)
142            video_mem[vaddr]=(video_mem[vaddr] & mask) ^ (colour<<(lshifts)); 
143        else
144            video_mem[vaddr]=(video_mem[vaddr] & mask) | (colour<<(lshifts)); 
145 
146        if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
147            logerror("set_pixel(X=%04X, y=%04x, pixel_offset=%02X, on_off=%02X), vaddr=%04X, mask=%02X, last=%02X, current=%02X\n",x,y,pixel_offset,on_off,vaddr,mask,last,video_mem[vaddr]);
148    }
139149    else
140        video_mem[vaddr]=(video_mem[vaddr] & mask) | (colour<<(lshifts)); 
141 
142    if(debug_on & DEBUG_TEXT)
143        logerror("set_pixel(X=%04X, y=%04x, pixel_offset=%02X, on_off=%02X), vaddr=%04X, mask=%02X, last=%02X, current=%02X\n",x,y,pixel_offset,on_off,vaddr,mask,last,video_mem[vaddr]);
150    {
151        if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
152            logerror("ERROR: vaddr=%05X > VRAM_SIZE=%05X\n",vaddr,VRAM_SIZE);
153    }
144154}
145155 
146156 
r6798r6799
149159    UINT8   bit;
150160    UINT16  pixel_x;
151161    UINT8   shifts;
162 
163    if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
164        logerror("write_pixel_line(x=%04X, y=%04X, data=%04X, mem_mask=%04X,width=%02X)\n",x,y,data,mem_mask,width);
152165     
153166    shifts=(width==4) ? 2 : 1;     
154167     
r6798r6799
162175 
163176static void write_pixel_data(UINT16 x, UINT16 y, UINT16    data, UINT16    mem_mask)
164177{     
178    if(debug_on & (DEBUG_TEXT | DEBUG_PIXEL))
179        logerror("write_pixel_data(x=%04X, y=%04X, data=%04X, mem_mask=%04X), reg022=%04X\n",x,y,data,mem_mask,reg022);
180     
165181    switch (reg022 & WIDTH_MASK)
166182    {
167183        case 0x00   : write_pixel_line(x,y,data,mem_mask,16); break;
src/mess/includes/rmnimbus.h
r6798r6799
1111 
1212#define DEBUG_TEXT  0x01
1313#define DEBUG_DB    0x02
14#define DEBUG_PIXEL 0x04
1415 
1516#define MAINCPU_TAG "maincpu"
1617 
r6798r6799
5960 
6061/* Z80 SIO for keyboard */
6162 
62#define Z80SIO_TAG      "z80sio"
63#define NIMBUS_KEYROWS  1
63#define Z80SIO_TAG          "z80sio"
64#define NIMBUS_KEYROWS      11
65#define KEYBOARD_QUEUE_SIZE 32
6466 
6567extern const z80sio_interface sio_intf;
6668 
src/mess/machine/rmnimbus.c
r6798r6799
2929/*-------------------------------------------------------------------------*/
3030 
3131/* CPU 80186 */
32#define LATCH_INTS 1
33#define LOG_PORTS 0
34#define LOG_INTERRUPTS 0
35#define LOG_INTERRUPTS_EXT 0
36#define LOG_TIMER 0
37#define LOG_OPTIMIZATION 0
38#define LOG_DMA 1
32#define LATCH_INTS          1
33#define LOG_PORTS           0
34#define LOG_INTERRUPTS      0
35#define LOG_INTERRUPTS_EXT  0
36#define LOG_TIMER           0
37#define LOG_OPTIMIZATION    0
38#define LOG_DMA             0
3939#define CPU_RESUME_TRIGGER   7123
40#define LOG_KEYBOARD        1
4041 
4142/* 80186 internal stuff */
4243struct mem_state
r6798r6799
106107   sio_serial_receive      /* receive handler */
107108};
108109 
109static UINT8    keyrows[NIMBUS_KEYROWS];
110struct keybord_state
111{
112    UINT8       keyrows[NIMBUS_KEYROWS];
113    emu_timer   *keyscan_timer;
114    UINT8       queue[KEYBOARD_QUEUE_SIZE];
115   UINT8       head;
116   UINT8       tail;
117} keyboard;
110118 
119 
120 
111121/* Floppy drives WD2793 */
112122 
113123static WRITE_LINE_DEVICE_HANDLER( nimbus_fdc_intrq_w );
r6798r6799
133143 
134144static void execute_debug_irq(running_machine *machine, int ref, int params, const char *param[]);
135145static void execute_debug_intmasks(running_machine *machine, int ref, int params, const char *param[]);
136static void execute_debug_key(running_machine *machine, int ref, int params, const char *param[]);
137146 
138147static int instruction_hook(const device_config *device, offs_t curpc);
139148static void decode_subbios(const device_config *device,offs_t pc);
r6798r6799
142151static void decode_dssi_f_set_new_clt(const device_config *device,UINT16  ds, UINT16 si);
143152static void fdc_reset(void);
144153 
154static void keyboard_reset(void);
155static TIMER_CALLBACK(keyscan_callback);
145156 
146157#define num_ioports 0x80
147158static UINT16   IOPorts[num_ioports];
r6798r6799
699710           
700711        return;
701712    }
702 
703713 
704714    if(dma->control & DEST_MIO)
705715    {
706716        dest_space=memory_space;
707        logerror("dest=memory\n");
717        //logerror("dest=memory\n");
708718    }
709719    else
710720    {
711721        dest_space=io_space;
712        logerror("dest=I/O\n");
722        //logerror("dest=I/O\n");
713723    }
714724     
715725    if(dma->control & SRC_MIO)
716726    {
717727        src_space=memory_space;
718        logerror("src=memory\n");
728        //logerror("src=memory\n");
719729    }
720730    else
721731    {
722732        src_space=io_space;
723        logerror("src=I/O\n");
733        //logerror("src=I/O\n");
724734    }
725735     
726736    // Do the transfer
r6798r6799
773783      i186.intr.request |= 0x04 << which;
774784      update_interrupt_state(machine);       
775785    }
776    logerror("DMA callback done\n");
786    //logerror("DMA callback done\n");
777787}
778788 
779789/*-------------------------------------------------------------------------*/
r6798r6799
12491259   /* CPU */
12501260   nimbus_cpu_reset(machine); 
12511261    fdc_reset();
1262    keyboard_reset();
12521263}
12531264 
12541265DRIVER_INIT(nimbus)
r6798r6799
12591270{
12601271    /* init cpu */
12611272    nimbus_cpu_init(machine);
1273 
1274    keyboard.keyscan_timer=timer_alloc(machine, keyscan_callback, NULL);
12621275     
12631276   /* setup debug commands */
12641277   if (machine->debug_flags & DEBUG_FLAG_ENABLED)
12651278   {
12661279      debug_console_register_command(machine, "nimbus_irq", CMDFLAG_NONE, 0, 0, 1, execute_debug_irq);
12671280        debug_console_register_command(machine, "nimbus_intmasks", CMDFLAG_NONE, 0, 0, 0, execute_debug_intmasks);
1268        debug_console_register_command(machine, "nimbus_key", CMDFLAG_NONE, 0, 0, 1, execute_debug_key);
1269   
1270         
1281 
12711282        /* set up the instruction hook */
12721283        debug_cpu_set_instruction_hook(cputag_get_cpu(machine, MAINCPU_TAG), instruction_hook);
12731284     
r6798r6799
13271338    debug_console_printf(machine,"i186.intr.in_service= %04X\n",i186.intr.in_service);
13281339}
13291340 
1330static void execute_debug_key(running_machine *machine, int ref, int params, const char *param[])
1331{
1332    int Key;
1333     
1334    if(params>0)
1335    {   
1336        sscanf(param[0],"%d",&Key);
1337         
1338        nextkey=Key;
1339    }
1340    else
1341    {
1342        debug_console_printf(machine,"Error, you must supply a keycode\n");
1343    }
1344   
1345     
1346}
1347 
1348 
13491341/*-----------------------------------------------
13501342    instruction_hook - per-instruction hook
13511343-----------------------------------------------*/
r6798r6799
17361728    }
17371729}
17381730 
1731 
17391732/* 
1733    Keyboard emulation 
1734     
1735*/
17401736 
1737static void keyboard_reset(void)
1738{
1739    memset(keyboard.keyrows,0xFF,NIMBUS_KEYROWS);
1740     
1741    // Setup timer to scan keyboard.
1742    timer_adjust_periodic(keyboard.keyscan_timer, attotime_zero, 0, ATTOTIME_IN_HZ(50));
1743 
1744}
1745 
1746static void queue_scancode(UINT8 scancode)
1747{
1748   keyboard.queue[keyboard.head] = scancode;
1749   keyboard.head++;
1750   keyboard.head %= (sizeof(keyboard.queue) / sizeof(keyboard.queue[0]));
1751}
1752 
1753static int keyboard_queue_read(void)
1754{
1755   int data;
1756   if (keyboard.tail == keyboard.head)
1757      return -1;
1758 
1759   data = keyboard.queue[keyboard.tail];
1760 
1761   if (LOG_KEYBOARD)
1762      logerror("at_keyboard_read(): Keyboard Read 0x%02x\n",data);
1763 
1764   keyboard.tail++;
1765   keyboard.tail %= sizeof(keyboard.queue) / sizeof(keyboard.queue[0]);
1766   return data;
1767}
1768 
1769static TIMER_CALLBACK(keyscan_callback)
1770{
1771    UINT8   keyrow;
1772    UINT8   row;
1773    UINT8   bitno;
1774    UINT8   mask;
1775    static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4",
1776                                             "KEY5", "KEY6", "KEY7", "KEY8", "KEY9", 
1777                                             "KEY10"};
1778 
1779    for(row=0;row<NIMBUS_KEYROWS;row++)
1780    {
1781        keyrow=input_port_read(machine, keynames[row]);
1782         
1783        for(mask=0x80, bitno=7;mask>0;mask=mask>>1, bitno-=1)
1784        {
1785            if(!(keyrow & mask) && (keyboard.keyrows[row] & mask))
1786            {
1787                logerror("keypress %02X\n",(row<<3)+bitno);
1788                queue_scancode((row<<3)+bitno);
1789            }
1790   
1791            if((keyrow & mask) && !(keyboard.keyrows[row] & mask))
1792            {
1793                logerror("keyrelease %02X\n",0x80+(row<<3)+bitno);   
1794                queue_scancode(0x80+(row<<3)+bitno);
1795            }
1796        }
1797         
1798        keyboard.keyrows[row]=keyrow;
1799    }
1800}
1801 
1802 
1803/* 
1804 
17411805Z80SIO, used for the keyboard interface 
17421806 
17431807*/
r6798r6799
18201884 
18211885int sio_serial_receive( const device_config *device, int channel )
18221886{
1823    UINT8   keyrow;
1824    UINT8   row;
1825    static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4",
1826                                             "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
1827    int     key;
1828 
18291887   if(channel==0)
18301888    {
1831        key=-1;
1832         
1833        //logerror("Read keyboard\n");
1834        for(row=0;row<NIMBUS_KEYROWS;row++)
1835        {
1836            keyrow=input_port_read(device->machine, keynames[row]);
1837            if(keyrows[row]!=keyrow)
1838            {
1839                keyrows[row]=keyrow;
1840                key=~keyrow & 0xff;
1841            }
1842        }
1843         
1844        if (nextkey!=0)
1845        {
1846            key=nextkey;
1847            nextkey=0;
1848        }
1849         
1850        if(key!=-1) 
1851            logerror("Keypressed=%02X\n",key);
1852         
1853        return key;
1889        return keyboard_queue_read();       
18541890    }
18551891    else
18561892        return -1;
src/mess/drivers/rmnimbus.c
r6798r6799
6767ADDRESS_MAP_END
6868 
6969static INPUT_PORTS_START( nimbus )
70   PORT_START("KEY0") /* Key row  10 */
71   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
72   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2')
73   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3')
74   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4')
75   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5')
76   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6')
77   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7')
78    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8')
70   PORT_START("KEY0") /* Key row 0 scancodes 00..07 */
71   //PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1')
72   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC")    PORT_CODE(KEYCODE_ESC)          PORT_CHAR(0x1B)
73   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1")      PORT_CODE(KEYCODE_1)            PORT_CHAR('1')
74   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2")      PORT_CODE(KEYCODE_2)            PORT_CHAR('2')
75   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3")      PORT_CODE(KEYCODE_3)            PORT_CHAR('3')
76   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4")      PORT_CODE(KEYCODE_4)            PORT_CHAR('4')
77   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5")      PORT_CODE(KEYCODE_5)            PORT_CHAR('5')
78    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6")      PORT_CODE(KEYCODE_6)            PORT_CHAR('6')
7979 
80   PORT_START("KEY1") /* Key row 1 scancodes 08..0F */
81   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7")      PORT_CODE(KEYCODE_1)            PORT_CHAR('7')
82   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8")      PORT_CODE(KEYCODE_ESC)          PORT_CHAR('8')
83   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9")      PORT_CODE(KEYCODE_1)            PORT_CHAR('9')
84   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0")      PORT_CODE(KEYCODE_2)            PORT_CHAR('0')
85   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-")      PORT_CODE(KEYCODE_MINUS)        PORT_CHAR('-')
86   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=")      PORT_CODE(KEYCODE_EQUALS)       PORT_CHAR('=')
87   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BSPACE") PORT_CODE(KEYCODE_BACKSPACE)    PORT_CHAR(0x08)
88    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TAB")    PORT_CODE(KEYCODE_TAB)          PORT_CHAR(0x09)
89 
90   PORT_START("KEY2") /* Key row 2 scancodes 10..17 */
91   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q")      PORT_CODE(KEYCODE_Q)            PORT_CHAR('Q')
92   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W")      PORT_CODE(KEYCODE_W)            PORT_CHAR('W')
93   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E")      PORT_CODE(KEYCODE_E)            PORT_CHAR('E')
94   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R")      PORT_CODE(KEYCODE_R)            PORT_CHAR('R')
95   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T")      PORT_CODE(KEYCODE_T)            PORT_CHAR('T')
96   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y")      PORT_CODE(KEYCODE_Y)            PORT_CHAR('Y')
97   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U")      PORT_CODE(KEYCODE_U)            PORT_CHAR('U')
98    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I")      PORT_CODE(KEYCODE_I)            PORT_CHAR('I')
99 
100   PORT_START("KEY3") /* Key row 3 scancodes 18..1F */
101   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O")      PORT_CODE(KEYCODE_O)            PORT_CHAR('O')
102   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P")      PORT_CODE(KEYCODE_P)            PORT_CHAR('P')
103   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[")      PORT_CODE(KEYCODE_OPENBRACE)    PORT_CHAR('[')
104   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]")      PORT_CODE(KEYCODE_CLOSEBRACE)   PORT_CHAR(']')
105   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER")  PORT_CODE(KEYCODE_ENTER)        PORT_CHAR(0x0D)
106   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CTRL")   PORT_CODE(KEYCODE_LCONTROL)     PORT_CODE(KEYCODE_RCONTROL) // Ether control
107   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A")      PORT_CODE(KEYCODE_A)            PORT_CHAR('A')
108    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S")      PORT_CODE(KEYCODE_S)            PORT_CHAR('S')
109 
110   PORT_START("KEY4") /* Key row 4 scancodes 20..27 */
111   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D")      PORT_CODE(KEYCODE_D)            PORT_CHAR('D')
112   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F")      PORT_CODE(KEYCODE_F)            PORT_CHAR('F')
113   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G")      PORT_CODE(KEYCODE_G)            PORT_CHAR('G')
114   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H")      PORT_CODE(KEYCODE_H)            PORT_CHAR('H')
115   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J")      PORT_CODE(KEYCODE_J)            PORT_CHAR('J')
116   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K")      PORT_CODE(KEYCODE_K)            PORT_CHAR('K')
117   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L")      PORT_CODE(KEYCODE_L)            PORT_CHAR('L')
118    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";")      PORT_CODE(KEYCODE_QUOTE)        PORT_CHAR(';')
119 
120   PORT_START("KEY5") /* Key row 5 scancodes 28..2F */
121    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("#")      PORT_CODE(KEYCODE_QUOTE)        PORT_CHAR('#')
122   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\")     PORT_CODE(KEYCODE_BACKSLASH)    PORT_CHAR('\\')
123   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LSHIFT") PORT_CODE(KEYCODE_LSHIFT)       PORT_CHAR(UCHAR_SHIFT_1)
124   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("TILDE")  PORT_CODE(KEYCODE_TILDE)        PORT_CHAR('`')
125   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z")      PORT_CODE(KEYCODE_Z)            PORT_CHAR('Z')
126   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X")      PORT_CODE(KEYCODE_X)            PORT_CHAR('X')
127   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C")      PORT_CODE(KEYCODE_C)            PORT_CHAR('C')
128   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V")      PORT_CODE(KEYCODE_V)            PORT_CHAR('V')
129   
130 
131   PORT_START("KEY6") /* Key row 6 scancodes 30..37 */
132    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B")      PORT_CODE(KEYCODE_B)            PORT_CHAR('B')
133    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N")      PORT_CODE(KEYCODE_N)            PORT_CHAR('N')
134   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M")      PORT_CODE(KEYCODE_M)            PORT_CHAR('M')
135   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",")      PORT_CODE(KEYCODE_COMMA)        PORT_CHAR(',')
136   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".")      PORT_CODE(KEYCODE_STOP)         PORT_CHAR('.')
137   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/")      PORT_CODE(KEYCODE_SLASH)        PORT_CHAR('/')
138   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("RSHIFT") PORT_CODE(KEYCODE_RSHIFT)       PORT_CHAR(UCHAR_SHIFT_2)
139   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PRSCR")  PORT_CODE(KEYCODE_ASTERISK)     PORT_CHAR('*')
140   
141   PORT_START("KEY7") /* Key row 7 scancodes 38..3F */
142    PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ALT")    PORT_CODE(KEYCODE_LALT)         PORT_CODE(KEYCODE_RALT)
143    PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE")  PORT_CODE(KEYCODE_SPACE)        PORT_CHAR(' ')
144   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS")   PORT_CODE(KEYCODE_CAPSLOCK)     
145   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1")     PORT_CODE(KEYCODE_F1)           
146   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2")     PORT_CODE(KEYCODE_F2)           
147   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3")     PORT_CODE(KEYCODE_F3)           
148   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4")     PORT_CODE(KEYCODE_F4)           
149   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5")     PORT_CODE(KEYCODE_F5)           
150     
151   
152    PORT_START("KEY8") /* Key row 8 scancodes 40..47 */
153   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F6")     PORT_CODE(KEYCODE_F6)             
154   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7")     PORT_CODE(KEYCODE_F7)             
155   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F8")     PORT_CODE(KEYCODE_F8)             
156   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F9")     PORT_CODE(KEYCODE_F9)             
157   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F10")    PORT_CODE(KEYCODE_F10)             
158   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("NUMLK")  PORT_CODE(KEYCODE_NUMLOCK)       
159   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SCRLK")  PORT_CODE(KEYCODE_SCRLOCK)             
160    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP7")    PORT_CODE(KEYCODE_7_PAD)        PORT_CHAR('7')
161 
162   PORT_START("KEY9") /* Key row 9 scancodes 48..4F */
163   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP8")    PORT_CODE(KEYCODE_8_PAD)        PORT_CHAR('8')
164   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP9")    PORT_CODE(KEYCODE_9_PAD)        PORT_CHAR('9')
165   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP-")    PORT_CODE(KEYCODE_MINUS_PAD)    PORT_CHAR('-')
166   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP4")    PORT_CODE(KEYCODE_4_PAD)        PORT_CHAR('4')
167   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5")    PORT_CODE(KEYCODE_5_PAD)        PORT_CHAR('5')
168   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6")    PORT_CODE(KEYCODE_6_PAD)        PORT_CHAR('6')
169   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+")    PORT_CODE(KEYCODE_PLUS_PAD)     PORT_CHAR('+')
170    PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1")    PORT_CODE(KEYCODE_1_PAD)        PORT_CHAR('1')
171 
172   PORT_START("KEY10") /* Key row 10 scancodes 50..57 */
173   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP2")    PORT_CODE(KEYCODE_2_PAD)        PORT_CHAR('2')
174   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP3")    PORT_CODE(KEYCODE_3_PAD)        PORT_CHAR('3')
175   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP0")    PORT_CODE(KEYCODE_0_PAD)        PORT_CHAR('0')
176   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP.")    PORT_CODE(KEYCODE_DEL_PAD)      PORT_CHAR('.')
177   //PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP5")    PORT_CODE(KEYCODE_5_PAD)        PORT_CHAR('5')
178   //PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP6")    PORT_CODE(KEYCODE_6_PAD)        PORT_CHAR('6')
179   //PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP+")    PORT_CODE(KEYCODE_PLUS_PAD)     PORT_CHAR('+')
180    //PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KP1")    PORT_CODE(KEYCODE_1_PAD)        PORT_CHAR('1')
80181INPUT_PORTS_END
81182 
82183 

Previous 15994 Revisions Next


© 1998-2018 The MESS Team