Previous Thread
Next Thread
Print Thread
Page 2 of 6 1 2 3 4 5 6
Re: c64 super sketch [Re: Golden Child] #115956 09/19/19 06:41 AM
Joined: Feb 2014
Posts: 358
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 358
So the coleco has to read data from the super sketch at $CF00, but it has to write some data to the super sketch to setup the read, writing data to $E000.

We want 3 bytes of data from the super sketch so we load 3 into b. The data will be returned in 703A, 703B and 703C, so we put 703A in iy and call 89b3.

After returning from 89b3 we start to process the data in 703b.

[Linked Image from i.imgur.com]

at 89b3 we initialize ix and iy again (the ix is pointing to a table of 4 values to send).

The routine at 89dc actually sends the data to $e000 and returns the value in c.

ld (iy+$00),a puts the value into iy and we inc iy to advance our pointer.

After returning we add 4 to ix and go back to read the next byte. djnz decrements our b and restarts the loop.


[Linked Image from i.imgur.com]


89dc is where all the magic happens, we clock a bunch of values into $e000. There's a specific sequence for each byte we want, varying by the middle part that is pointed to in a table at 89a7.

When that's setup, we load 8 into b, clear c and a.

Now we loop 8 times: we clock a 0 to $e000. Then read CF00, getting the low bit and shifting c with SLA (shift left arithmetic). Adding a to c. Also clocking a 4 to $e000. A short delay with call 89d6. Finally we write a $0a into $e000.

[Linked Image from i.imgur.com]


The table at 89a7:

if 00 04 represents 0 and 02 06 represents 1, then we can look at this table as:

10
00
01

and we're selecting which of the 3 bytes we're going to return, x,y or buttons.

[Linked Image from i.imgur.com]

So we're getting closer...

Re: c64 super sketch [Re: Golden Child] #115958 09/19/19 08:39 AM
Joined: Feb 2014
Posts: 358
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 358
Ok, let's see if we can get some proper data to it:

The sequence of bytes to E000: is 10,2,6,2,6,x,x,x,x,2,4,0,4,readCF00,0,4,readCF00,0,4,...10. So we'll reset our count when we see 10 and get the values at position 5 and 7 (5678 are x) to choose which item we return: x,y or buttons.

Code
WRITE8_MEMBER( coleco_state::supersketch_w )
{
    if (data==10) {m_supersketch_pos=0; m_supersketch_shiftpos=0;}
    else m_supersketch_pos++;
     if (m_supersketch_pos == 5)
          m_supersketch_item = (data==2) ? 1 : 0;
    else if (m_supersketch_pos ==7)
          {m_supersketch_item += ((data==2) ? 2 : 0);
           if      (m_supersketch_item==0) m_supersketch_data=m_test_joy1y->read();
           else if (m_supersketch_item==1) m_supersketch_data=m_test_joy1x->read();
           else if (m_supersketch_item==2) m_supersketch_data=m_test_bits->read()^0xff;
           }

   printf("e000 pos=%x data=%x  item=%x\n",m_supersketch_pos,data,m_supersketch_item);
}

READ8_MEMBER( coleco_state::cf00test_r )
{
        int bit = m_supersketch_data&0x80 ? 1 : 0;
        m_supersketch_data <<= 1;
        m_supersketch_shiftpos ++;  
        return bit;
}


Code
    if (m_cart->exists())
                m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xffff, read8_delegate(FUNC(coleco_state::cart_r),this));

        m_maincpu->space(AS_PROGRAM).install_read_handler(0xcf00, 0xcf00, read8_delegate(FUNC(coleco_state::cf00test_r),this));
        m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000, 0xe000, write8_delegate(FUNC(coleco_state::supersketch_w),this));



and then add some stuff to src/machine/coleco.cpp

Code
#define JOYSTICK_DELTA          80
#define JOYSTICK_SENSITIVITY    50
#define JOYSTICK_AUTOCENTER     80


static INPUT_PORTS_START( testbits )
        PORT_START("TEST_BITS")
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("BUT1")
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("BUT2")
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("BUT3")
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("BUT4")
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("BUT5")
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("BUT6")
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("BUT7")
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("BUT8")
        PORT_BIT( 0x00, IP_ACTIVE_LOW, IPT_UNKNOWN )

        PORT_START("TEST_analog_joystick_1_x")      /* Joystick 1 X Axis */
        PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_NAME("TEST Joystick X")
        PORT_SENSITIVITY(JOYSTICK_SENSITIVITY)
        PORT_KEYDELTA(JOYSTICK_DELTA)
        PORT_CENTERDELTA(JOYSTICK_AUTOCENTER)
        PORT_MINMAX(0,0xff) PORT_PLAYER(1)
        PORT_CODE_DEC(KEYCODE_4_PAD)    PORT_CODE_INC(KEYCODE_6_PAD)
        PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH)    PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH)

           PORT_START("TEST_analog_joystick_1_y")      /* Joystick 1 Y Axis */
        PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_NAME("TEST Joystick Y")
        PORT_SENSITIVITY(JOYSTICK_SENSITIVITY)
        PORT_KEYDELTA(JOYSTICK_DELTA)
        PORT_CENTERDELTA(JOYSTICK_AUTOCENTER)
        PORT_MINMAX(0,0xff) PORT_PLAYER(1)
        PORT_CODE_DEC(KEYCODE_8_PAD)    PORT_CODE_INC(KEYCODE_2_PAD)
        PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH)      PORT_CODE_INC(JOYCODE_Y_UP_SWITCH)

INPUT_PORTS_END





and add our testbits ports to include

Code
   PORT_INCLUDE( sac2 )
        PORT_INCLUDE( driv1 )
        PORT_INCLUDE( driv2 )
        PORT_INCLUDE( roller )

        PORT_INCLUDE(  testbits )


and some stuff in src/mame/includes/coleco.h:
Code
                     m_driv_pedal2(*this, "DRIV_PEDAL2"),
                        m_roller_x(*this, "ROLLER_X"),
                        m_roller_y(*this, "ROLLER_Y"),
m_test_bits(*this, "TEST_BITS"),
m_test_joy1x(*this, "TEST_analog_joystick_1_x"),
m_test_joy1y(*this, "TEST_analog_joystick_1_y")

...

        DECLARE_READ8_MEMBER( cf00test_r );
        DECLARE_WRITE8_MEMBER( supersketch_w );

...

required_ioport m_test_bits;
required_ioport m_test_joy1x,m_test_joy1y;
int m_supersketch_pos,m_supersketch_data,m_supersketch_shiftpos;
int m_supersketch_item;


And now we can draw with the mouse (badly)

[Linked Image from i.imgur.com][Linked Image from i.imgur.com]

Re: c64 super sketch [Re: Golden Child] #115959 09/19/19 02:42 PM
Joined: Feb 2014
Posts: 358
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 358
What's actually inside of the super sketch? Searching for the ti99 super sketch gave a couple of pages with nice hi-res pics of the board:

ti 99 super sketch

https://www.nightfallcrew.com/22/10/2016/ppi-super-sketch-for-texas-instruments-ti-994a/

http://www.ti99.com/ti/index.php?article118/super-sketch-personal-peripherals-inc


Big pic of board: (1600x900)

https://www.nightfallcrew.com/wp-co...ruments-ti-99-repair/20161016_122922.JPG


shows 6 chips, one big rom, a TI adc0834 analog to digital converter chip, 74ls30 8 input nand , 74ls139 1 to 4 decoder. 74ls367 hex bus driver, 74hc174 flip flop.



c64 super sketch:

You can see the adc0834 chip in the plug.

https://www.nightfallcrew.com/25/04/2012/super-sketch-commodore-64-ppirushware/

I didn't see the second page of pics when I first looked that show the insides of the unit:

https://www.nightfallcrew.com/25/04/2012/super-sketch-commodore-64-ppirushware/?nggpage=2


Re: c64 super sketch [Re: Golden Child] #115967 09/20/19 11:33 AM
Joined: Feb 2014
Posts: 358
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 358
So let's have a look at the TI99 version of the super sketch.

The TMS9900 has really different machine language..so strange and cryptic. A for add. B for branch. BL for branch and link, this calls a subroutine putting the return address into R11, then do a b *r11 to return from the subroutine.

The wackiest thing is SOC which means Set Ones Corresponding. What does that mean? Oh it's just OR with a abstruse name. Why not just say OR? Theres an ORI or immediate in the instruction set, so it's confusing. So what does AND? SZC. SZC is set zeroes corresponding. SZC=AND, SOC=OR.


After fruitlessly staring at the code for awhile and getting familiar with the TI memory map, I had an insight, why not put a watchpoint for writes in the cart address space?

wp 6000,2000,w

and it stops writing 5050 to 0007FF0 (PC=6AAA)

Aha! That's our access to the super sketch.


Code
> wp 6000,2000,w
Watchpoint 1 set
Stopped at watchpoint 1 writing 5050 to 00007FF0 (PC=6AAA)
>wp 7ff0,1,r
Watchpoint 2 set
Stopped at watchpoint 2 reading 8080 from 00007FF0 (PC=6AB0)
Stopped at watchpoint 1 writing 4040 to 00007FF0 (PC=6AB0)

....


write pattern is 50 40 60 40 60 40 60 00 20 00 20 00 20

---- first real "read" from 7ff0

Stopped at watchpoint 2 reading 8080 from 00007FF0 (PC=6AEA)


Code
   WRITE 7ff0                  pc=6AAA  wpaddr=7FF0 wpdata=5050
   WRITE 7ff0                  pc=6AB0  wpaddr=7FF0 wpdata=4040
   WRITE 7ff0                  pc=6AB4  wpaddr=7FF0 wpdata=6060
   WRITE 7ff0                  pc=6AB8  wpaddr=7FF0 wpdata=4040
   WRITE 7ff0                  pc=6ABC  wpaddr=7FF0 wpdata=6060
   WRITE 7ff0                  pc=6AC2  wpaddr=7FF0 wpdata=4040
   WRITE 7ff0                  pc=6AC6  wpaddr=7FF0 wpdata=6060
   WRITE 7ff0                  pc=6ACA  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6ACE  wpaddr=7FF0 wpdata=2020
   WRITE 7ff0                  pc=6AD2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AD6  wpaddr=7FF0 wpdata=2020
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6AE2  wpaddr=7FF0 wpdata=0
   WRITE 7ff0                  pc=6AE8  wpaddr=7FF0 wpdata=2020
READ 7ff0  R8=0 PC=6AEA wpaddr=7FF0 wpdata=8080
   WRITE 7ff0                  pc=6B02  wpaddr=7FF0 wpdata=5050



R2 = 7FF0 (pointer to supersketch port)

Code
6A9E: CE8B      mov  R11,*R10+      r10 is our "stack" pointer, save the return address
6AA0: 0200 5050 li   R0,>5050       load immediate r0=5050  (registers are 16 bit but we're only interested in bytes so think "50")
6AA4: 0205 2020 li   R5,>2020       load immediate r5=2020
6AA8: C480      mov  R0,*R2          write 50 to 7ff0   (actually writes 5050 to 7ff0, 7ff1 gets written too but it doesn't hurt anything)
6AAA: 0200 4040 li   R0,>4040      load immediate r0=4040
6AAE: C480      mov  R0,*R2      write 40 to 7ff0
6AB0: A005      a    R5,R0          add, r0= r0 + r5   (in this case r0=6060 (4040+2020)
6AB2: C480      mov  R0,*R2      write 20 to 7ff0
6AB4: 6005      s    R5,R0           subtract, r0 = r0 + r5   (r0 = 2020 (6060-2020))
6AB6: C480      mov  R0,*R2
6AB8: A005      a    R5,R0           add r5 to r0
6ABA: C480      mov  R0,*R2         send r0 to supersketch
6ABC: 6005      s    R5,R0           subtract r5 from r0

6ABE: A036      a    *R6+,R0       add to r0 what r6 is pointing to and increment r6 by 2  (our table at 6b06)
6AC0: C480      mov  R0,*R2
6AC2: A005      a    R5,R0
6AC4: C480      mov  R0,*R2
6AC6: 6036      s    *R6+,R0        subtract from r0 what r6 is pointing at and increment by 2
6AC8: C480      mov  R0,*R2

6ACA: A005      a    R5,R0
6ACC: C480      mov  R0,*R2
6ACE: 6005      s    R5,R0
6AD0: C480      mov  R0,*R2
6AD2: A005      a    R5,R0
6AD4: C480      mov  R0,*R2
6AD6: 0209 0008 li   R9,>0008         bit counter, put 8 into r9
6ADA: 04C1      clr  R1                      clear r1
6ADC: 0A11      sla  R1,1         shift r1 left by 1 bit
6ADE: 6005      s    R5,R0 
6AE0: C480      mov  R0,*R2
6AE2: 1000      jmp  >6ae4         jumps to the next instruction
6AE4: A005      a    R5,R0
6AE6: C480      mov  R0,*R2
6AE8: C0D2      mov  *R2,R3             read data from the super sketch port (7ff0) put into r3
6AEA: 0243 8080 andi R3,>8080      and r3 with 80 (get high bit)
6AEE: 0973      srl  R3,7          shift r3 right by 7 bits (make it the low bit)
6AF0: E043      soc  R3,R1     OR r3 with r1, r1=r1 OR r3
6AF2: 0609      dec  R9           decrement our bit counter
6AF4: 16F3      jne  >6adc       go get another bit
6AF6: 06C1      swpb R1
6AF8: DA01 8382 movb R1,@>8382(R8)    store whole byte into address 8382+R8
6AFC: 0200 5050 li   R0,>5050
6B00: C480      mov  R0,*R2       write out 50 to 7ff0    (starts with a 50, ends with a 50)
6B02: 0460 6A8E b    @>6a8e




TMS9900 is really different, but once you know what you're looking at it's not so bad, the notation is funky.



[Linked Image from i.imgur.com]

Small table at 6b06:

[Linked Image from i.imgur.com]


I also figured out that it puts the buttons into 8392 to 8395,

so if you type this from the debugger:

g 6a40
g 6a8e
w@8392=0;w@8394=ff00

you can get past the title screen where it wants a menu button press.

[Linked Image from i.imgur.com] [Linked Image from i.imgur.com]

Re: c64 super sketch [Re: Golden Child] #115968 09/20/19 11:43 AM
Joined: Mar 2001
Posts: 16,394
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,394
That's an EEPROM-style serial interface. 0x20 is the clock line, 0x10 is /enable (the / means enabled when low), and 0x40 is write data. So it sends 111000 to the chip then expects 8 bits of read back.

Re: c64 super sketch [Re: R. Belmont] #115970 09/20/19 06:37 PM
Joined: Feb 2014
Posts: 358
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 358
Yes, that sounds right.

http://www.ti.com/product/ADC0834-N

[Linked Image from i.imgur.com]


A few horrible hacks later (made more difficult because the TI wants to read the address for every write to the address, and it wants to read and write in 2 byte chunks so that means 2 calls to the read and write routine).

[Linked Image from i.imgur.com][Linked Image from i.imgur.com][Linked Image from i.imgur.com]

Re: c64 super sketch [Re: Golden Child] #115971 09/20/19 07:35 PM
Joined: Mar 2001
Posts: 16,394
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,394
We have an ADC0834 device in src/devices/machine/adc083x.h, incidentally.

Re: c64 super sketch [Re: R. Belmont] #115975 09/21/19 03:03 PM
Joined: Feb 2014
Posts: 358
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 358
Thanks for the pointer, RB! I did actually do a find src -name '*adc0834*' but that was too specific.

I needed to do

find src -name '*adc083*'
or
grep adc083 src -r


One of the things that's been perplexing is how the supersketch reads the buttons. There's 4 buttons (actually 3 since the lift button is repeated on each side). It has resistors on each button line so it actually reads it as an analog value from the adc0834.

That's why it has an adc0834 on the c64 when it actually reads the pad's x/y values with the potentiometer inputs on the gameport. It still uses the adc0834 to read the buttons as an analog value.

If you look closely at the nightfallcrew pictures, there's a resistor hiding under there crimped on. On the other side of the crimp that must be a resistor too. There must be at least a few more, I guess you'd need 6 for a resistor ladder?

[Linked Image from i.imgur.com]

Re: c64 super sketch [Re: Golden Child] #115979 09/21/19 10:14 PM
Joined: Jan 2018
Posts: 1
Z
zino Offline
Member
Offline
Member
Z
Joined: Jan 2018
Posts: 1
git-grep is nice and fast. Try "git grep adc0834"

Re: c64 super sketch [Re: Golden Child] #116071 10/03/19 02:15 PM
Joined: Feb 2014
Posts: 358
G
Golden Child Online Content OP
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 358
Ok, let's see if we can hook up the adc0834 device (using the ksys573 driver as a guide):


add some stuff to src/drivers/mame/ti99_4x.cpp:
Code
m_test_buttons(*this, "TEST_BUTTONS"),
m_test_joy1x(*this, "TEST_ANALOG_JOYSTICK_1_X"),
m_test_joy1y(*this, "TEST_ANALOG_JOYSTICK_1_Y"),
m_adc0834(*this, "adc0834"),
m_supersketch_out0(*this, "SUPERSKETCH_OUT0"),
m_supersketch_in0(*this, "SUPERSKETCH_IN0")


double supersketch_inputs_callback(uint8_t input);

required_ioport m_test_buttons,m_test_joy1x,m_test_joy1y;
required_device<adc0834_device> m_adc0834;
required_ioport m_supersketch_out0,m_supersketch_in0;



void ti99_4x_state::memmap(address_map &map)
 {
        map.global_mask(0xffff);
        map(0x0000, 0xffff).rw(TI99_DATAMUX_TAG, FUNC(bus::ti99::internal::datamux_device::read), FUNC(bus::ti99::internal::datamux_device::write));
        map(0x7ff0, 0x7ff1).portr("SUPERSKETCH_IN0").portw("SUPERSKETCH_OUT0");
 }



make a callback for adc0834:
Code

double ti99_4x_state::supersketch_inputs_callback(uint8_t input)
{
//     printf("read adc0834 callback %x\n",input);
        switch( input )
        {
        case ADC083X_CH0:
               return m_test_joy1y->read();
        case ADC083X_CH1:
               return m_test_joy1x->read();
        case ADC083X_CH2:
               return m_test_buttons->read() ^ 0xff;
        case ADC083X_CH3:
        case ADC083X_CH4:
        case ADC083X_CH5:
        case ADC083X_COM:
                return 0;
        case ADC083X_VREF:
                return 255;
        case ADC083X_AGND:
               return 0;
        }
        return 0;  // ground
}



setup the adc0834 in the ti99_4a state:


Code
void ti99_4x_state::ti99_4a(machine_config& config)
{

...

        adc0834_device &adc(ADC0834(config, "adc0834"));
        adc.set_input_callback(FUNC(ti99_4x_state::supersketch_inputs_callback));

 }
 



and setup our ports:

keypad 6,7,8 are "LIFT", "SELECT", "MENU"

(make sure you map keypad 6 on the analog input to something else, or your analog input will jump when you hit the lift button)

Code
static INPUT_PORTS_START(ti99_4a)

        PORT_START( "SUPERSKETCH_OUT0" )
        PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER( "adc0834", adc083x_device, cs_write )  PORT_NAME("CS")
        PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER( "adc0834", adc083x_device, clk_write )  PORT_NAME("CLK")
        PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER( "adc0834", adc083x_device, di_write )   PORT_NAME("DI")

        PORT_START( "SUPERSKETCH_IN0" )
        PORT_BIT( 0x80 , IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( "adc0834", adc083x_device, do_read )





#define JOYSTICK_DELTA          80
#define JOYSTICK_SENSITIVITY    50
#define JOYSTICK_AUTOCENTER     80


        PORT_START("TEST_BUTTONS")
        PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("BUT1") PORT_CODE(KEYCODE_1_PAD)
        PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("BUT2") PORT_CODE(KEYCODE_2_PAD)
        PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("BUT3") PORT_CODE(KEYCODE_3_PAD)
        PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("BUT4") PORT_CODE(KEYCODE_4_PAD)
        PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("BUT5") PORT_CODE(KEYCODE_5_PAD)
        PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("BUT6") PORT_CODE(KEYCODE_6_PAD)
        PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("BUT7") PORT_CODE(KEYCODE_7_PAD)
        PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("BUT8") PORT_CODE(KEYCODE_8_PAD)
        PORT_BIT( 0x00, IP_ACTIVE_LOW, IPT_UNKNOWN )

        PORT_START("TEST_ANALOG_JOYSTICK_1_X")      /* Joystick 1 X Axis */
        PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X) PORT_NAME("TEST Joystick X")
        PORT_SENSITIVITY(JOYSTICK_SENSITIVITY)
        PORT_KEYDELTA(JOYSTICK_DELTA)
        PORT_CENTERDELTA(JOYSTICK_AUTOCENTER)
        PORT_MINMAX(0,0xff) PORT_PLAYER(1)
        PORT_CODE_DEC(KEYCODE_4_PAD)    PORT_CODE_INC(KEYCODE_6_PAD)
        PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH)    PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH)

        PORT_START("TEST_ANALOG_JOYSTICK_1_Y")      /* Joystick 1 Y Axis */
        PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y) PORT_NAME("TEST Joystick Y")
        PORT_SENSITIVITY(JOYSTICK_SENSITIVITY)
        PORT_KEYDELTA(JOYSTICK_DELTA)
        PORT_CENTERDELTA(JOYSTICK_AUTOCENTER)
        PORT_MINMAX(0,0xff) PORT_PLAYER(1)
        PORT_CODE_DEC(KEYCODE_8_PAD)    PORT_CODE_INC(KEYCODE_2_PAD)
        PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH)      PORT_CODE_INC(JOYCODE_Y_UP_SWITCH)

 INPUT_PORTS_END


Page 2 of 6 1 2 3 4 5 6

Who's Online Now
1 registered members (Stiletto), 222 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,722
Posts114,651
Members4,873
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3