Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
c64 super sketch #115940 09/17/19 08:08 PM
Joined: Feb 2014
Posts: 330
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 330
Thanks to a suggestion from rfka1, I thought I'd try my hand at figuring out the Super Sketch on the c64.

It looks like it just reads the potentiometer inputs, so let's do some driver mangling to see what happens:



Code

add some member variables to hold an analog inputs


-               m_va15(1)
+               m_va15(1),
+m_test_joy1x(*this, "TEST_analog_joystick_1_x"),
+m_test_joy1y(*this, "TEST_analog_joystick_1_y")
+

+
+required_ioport m_test_joy1x,m_test_joy1y;
+
 };
 
 
add some defines for an analog input
 
+
+#define JOYSTICK_DELTA          80
+#define JOYSTICK_SENSITIVITY    50
+#define JOYSTICK_AUTOCENTER     80
+
+

+        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
 

mangle the sid_pot reads, we'll just always return the m_joy1x or m_joy1y for cases 1,2,3.
 
READ8_MEMBER( c64_state::sid_potx_r )
 {
        uint8_t data = 0xff;
 
        switch (m_cia1->pa_r() >> 6)
        {
       
       case 1:
       case 2:
       case 3: data=m_test_joy1x->read(); break;

        }
 
        return data;
}
READ8_MEMBER( c64_state::sid_poty_r )
 {
        uint8_t data = 0xff;
 
        switch (m_cia1->pa_r() >> 6)
        {

       case 1:
       case 2:
       case 3: data=m_test_joy1y->read();
       break;
        }
 
        return data;
}


then you can change the potx and poty values with the analog input, and the digital joystick up/down/left and right will do the buttons for the pad.


To get past the initial screen put the joystick down in the lower right and press the digital down (I think that's the menu button).

[Linked Image from i.imgur.com]
[Linked Image from i.imgur.com]
some drawing (as best as I can with the numeric keypad masquerading as an analog joystick setting the analog speed/sensitivity to low values, I can't get the MouseX to map into the analog input in the UI menus)
[Linked Image from i.imgur.com]

I found a different SUPER-SKETCH.D64 but I could never get past the menu, wasted a few hours with that. There's also a .crt file but I couldn't get it to load.


make -j4 SOURCES=src/mame/drivers/c64.cpp SUBTARGET=myc64

./myc6464 c64 -joy1 joy -flop ../../supersketch-Uncredited-sb168350-Page-ZimmermanSet2.d64


There's still some puzzles to figure out (like why it wants to clock in a bunch of reads from the digital joystick inputs), but at least it does something.

Re: c64 super sketch [Re: Golden Child] #115941 09/17/19 09:49 PM
Joined: Jan 2012
Posts: 1,012
rfka01 Offline
Very Senior Member
Offline
Very Senior Member
Joined: Jan 2012
Posts: 1,012
Absolutely amazing, GC! Unfortunately the Apple II disk hasn't surfaced yet.


NCR DMV- DEC Rainbow- Siemens PCD- ITT 3030-Oly People- Acorn A5000- Olivetti M20
Re: c64 super sketch [Re: Golden Child] #115942 09/18/19 03:56 AM
Joined: Feb 2014
Posts: 330
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 330
Thanks, rfka01!

I thought I'd take a look at the atari version of super sketch, this was kinda fiddly because there's so many analog paddle inputs (8 to be exact). We're only interested in paddle 0 and 1, so figuring out which is which is a bit difficult. Also, the default analog setting is to be reversed.


If I hold down the joystick, and hit d (mapped to paddle 1 analog dec (but reversed so it's inc)) and keypad 8 (mapped to paddle 0 analog dec (but reversed so it's inc)) we can get past the initial screen. You can tell you're on the right track if you just hold down keypad 8 and joystick down and the color cycling gets very fast.

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

No labels for paddle analog inc/dec, which is which? It'd be awesome to have a little mini title in the driver like PORT_TITLE("PDL 0") that would show up in the UI.

[Linked Image from i.imgur.com]

Holding the joystick up direction while moving the analog inputs "picks up" the pen, if up is off, then it draws lines.

./mame64 a800 -cart1 ../../Super\ Sketch\ Graphics\ Master.rom

Re: c64 super sketch [Re: Golden Child] #115943 09/18/19 08:12 AM
Joined: May 2004
Posts: 890
D
Duke Offline
Senior Member
Offline
Senior Member
D
Joined: May 2004
Posts: 890
Originally Posted by Golden Child
No labels for paddle analog inc/dec, which is which? It'd be awesome to have a little mini title in the driver like PORT_TITLE("PDL 0") that would show up in the UI.


You can use PORT_NAME() for this.

Re: c64 super sketch [Re: Duke] #115944 09/18/19 01:33 PM
Joined: Feb 2014
Posts: 330
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 330
Thanks, Duke! PORT_NAME works pretty well.

Tacking on PORT_NAME("PDL 0") and PORT_NAME("PDL 1") gives this:

[Linked Image from i.imgur.com]

Code
static INPUT_PORTS_START( atari_analog_paddles )
        PORT_START("analog_0")
        PORT_BIT(0xff, 0x72, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_PLAYER(1) PORT_REVERSE PORT_NAME("PDL 0")

        PORT_START("analog_1")
        PORT_BIT(0xff, 0x72, IPT_PADDLE) PORT_SENSITIVITY(JOYSTICK_SENSITIVITY) PORT_KEYDELTA(JOYSTICK_DELTA) PORT_MINMAX(0x00,0xe4) PORT_PLAYER(2) PORT_REVERSE PORT_NAME("PDL 1")


Too bad that MouseX or MouseY isn't working...I can add it to the port with PORT_CODE(MOUSECODE_X) and PORT_CODE(MOUSECODE_Y) and see it listed but it just doesn't work.

Re: c64 super sketch [Re: Golden Child] #115945 09/18/19 02:52 PM
Joined: Mar 2001
Posts: 16,337
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,337
Are you running with -mouse? Are the physical mouse axes assigned to the mouse?

Re: c64 super sketch [Re: R. Belmont] #115946 09/18/19 03:02 PM
Joined: Feb 2014
Posts: 330
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 330
Beauty! Adding -mouse fixes it! Thanks, RB! (man how I struggled trying to get this to work!)


Holding up to "pick up the pen" seems to work.

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

Re: c64 super sketch [Re: Golden Child] #115947 09/18/19 03:13 PM
Joined: Mar 2001
Posts: 16,337
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,337
Great! That's also useful for -sl4 mouse on the IIe with Dazzle Draw, MousePaint, and Apple II DeskTop (or the IIc's built-in mouse interface).

Re: c64 super sketch [Re: R. Belmont] #115951 09/18/19 07:34 PM
Joined: Feb 2014
Posts: 330
G
Golden Child Offline OP
Senior Member
OP Offline
Senior Member
G
Joined: Feb 2014
Posts: 330
I was able to get the colecovision super sketch to get past the menu but the machine language is so alien to me (being a 6502 guy).

Seems to want to read from a shift register at $CF00.

Still a puzzle but it's doing something.

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

[Linked Image from i.imgur.com]

Seriously?

[Linked Image from i.imgur.com]

Re: c64 super sketch [Re: Golden Child] #115952 09/18/19 09:26 PM
Joined: Jan 2012
Posts: 1,012
rfka01 Offline
Very Senior Member
Offline
Very Senior Member
Joined: Jan 2012
Posts: 1,012
*snerk*


NCR DMV- DEC Rainbow- Siemens PCD- ITT 3030-Oly People- Acorn A5000- Olivetti M20
Page 1 of 3 1 2 3

Who's Online Now
13 registered members (zino, belegdol, Reznor007, Praxis, R. Belmont, hal3000, mfm005, drewcifer, Steve Bourg, Edstrom, Heihachi_73, zillion, 1 invisible), 136 guests, and 3 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,693
Posts114,273
Members4,865
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3