Results 1 to 11 of 11

Thread: PCE mouse

  1. #1

    PCE mouse

    After toying with emulation for a while, I finally got a real PCE mouse to test out. Protocol as follows:

    ; Mouse:
    ;
    ; $01 -> port, read X direction
    ;
    ; $00 -> port, read buttons
    ;
    ; $01 -> port, read X speed
    ;
    ; $00 -> port, read buttons
    ;
    ; $01 -> port, read Y direction
    ;
    ; $00 -> port, read buttons
    ;
    ; $01 -> port, read Y speed
    ;
    ; $00 -> port, read buttons
    ;
    ; Direction: Bit 8 indicates direction
    ;
    ; X: set value move right, clear value move left
    ;
    ; Y: set value move down, clear value move up
    ;
    ; Speed: Values are 4bit signed
    It is read in 4bit segments like the gamepad. 8 reads of nybbles as describe above. This is done in a single instance, not over multiple frames. I snag some mouse code from an official game and uses a small delay after resetting the TAP (mouse read on port 0 of tap):

    lda #$24
    .loop1
    dec a
    bne .loop1
    No delay is needed for reading each nybble or byte. Only the initial start.

    The mouse only has four buttons, but the extra/duplicate button reads in the above sample are for clocking the mouse (I assume. High to low or low to high edge logic/trigger). Pretty straight forward/easy.

    Automatic mouse detect should be easy. Since the code would read the gamepad multiple times, the directional values would be duplicated on a gamepad VS a mouse. And on a 6button pad, the signature is unique and different as well (one read has all four directional buttons pressed, the other directional read will not). So you can distinguish between a 2button, 6button and mouse. The cool thing is, you can use the mouse with the 5 port TAP. Imagine a homebrew game with 5 player mouse support! :D
    Last edited by tomaitheous; 09-11-2011 at 02:14 AM.

  2. #2
    ASSEMbler Hardcore
    l_oliveira's Avatar

    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    2,270
    I can think of only one PCE game that used the mouse and that is Tokimeki Memorial ... :shrug:

    I suppose the mouse must be very rare...

    Quote Originally Posted by tomaitheous View Post
    The cool thing is, you can use the mouse with the 5 port TAP. Imagine a homebrew game with 5 player mouse support! :D
    Now that's something which would be awesome ... 5 mouse pointers clicking around a single screen...
    Last edited by l_oliveira; 09-15-2011 at 03:58 PM.
    PlayStation Aficionado.
    MSX Maniac.

  3. #3
    Foot Soldier
    Chilly Willy's Avatar

    Join Date
    Mar 2011
    Location
    The Land of Enchantment
    Posts
    241
    Here's a page on the PCE mouse I found some time back.

    http://pages.interlog.com/~daves/pce_info/mouse.txt

  4. #4
    Quote Originally Posted by l_oliveira View Post
    I can think of only one PCE game that used the mouse and that is Tokimeki Memorial ... :shrug:

    I suppose the mouse must be very rare...



    Now that's something which would be awesome ... 5 mouse pointers clicking around a single screen...
    I think there's about 5 or so games that use it. Brandish is one and Vasteel 2 is another.

    Chilly Willy: http://pastebin.com/raw.php?i=Chw9Upvv But yeah, I saw Dave's page recently (we were talking about the mouse on IRC). Guess I should see if I can get it working on any other port than 1.
    Last edited by tomaitheous; 09-18-2011 at 05:06 AM.

  5. #5
    Foot Soldier
    Chilly Willy's Avatar

    Join Date
    Mar 2011
    Location
    The Land of Enchantment
    Posts
    241
    I just bought a pce mouse on ebay for $23 shipped. I should have it in a few weeks. Still need to get a tap.

  6. #6
    At least those (CD-ROM based) games have mouse support:

    A. III
    Atlas - The Renaissance Voyager
    Brandish
    Eikan ha Kimini - Koukou Yakyuu Zenkoku Taikai
    Jantei Monogatari III - Saver Angels
    Lemmings
    Metal Angel
    Nemurenumori no Chiisana Ohanashi
    Princess Maker II
    Tokimeki Memorial
    Vasteel II

    Too bad The Manhole ist not supported...

  7. #7
    Foot Soldier
    Chilly Willy's Avatar

    Join Date
    Mar 2011
    Location
    The Land of Enchantment
    Posts
    241
    My mouse came in the mail the other day. Are there any hucard based games that use it? I don't have a CD yet, just the SGX.

  8. #8
    Quote Originally Posted by Chilly Willy View Post
    My mouse came in the mail the other day. Are there any hucard based games that use it? I don't have a CD yet, just the SGX.
    I don't know of any off hand. But I can give you my mouse test rom, if you want to test it out.

  9. #9
    Foot Soldier
    Chilly Willy's Avatar

    Join Date
    Mar 2011
    Location
    The Land of Enchantment
    Posts
    241
    That would be cool. I'll eventually get around to my own PCE homebrew, but in the meantime, it would be nice to have something to test it with. :)

  10. #10
    http://www.pcedev.net/mouse/mouse_test.7z :katamari2
    (should be a headerless rom)
    Last edited by tomaitheous; 10-13-2011 at 12:16 PM.

  11. #11
    Foot Soldier
    Chilly Willy's Avatar

    Join Date
    Mar 2011
    Location
    The Land of Enchantment
    Posts
    241
    Quote Originally Posted by tomaitheous View Post
    http://www.pcedev.net/mouse/mouse_test.7z :katamari2
    (should be a headerless rom)
    Works fine! Thanks. :)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •