Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

Recent Posts

Pages: [1] 2 3 ... 10

Started by Toasty833 - Last post by Toasty833

So I did some more testing today. First run, all the offsets were off again, second they were as before. It seems that when my headset loses tracking it can switch to a different offset pattern. The first offset is roughly upside down and 3-4 feet higher. The second one is a 2-3 feet higher turned 90 degrees right, with the headset also being turned about 90 degrees right. These both affect the replays, but cycling the HMD tends to put it back on the first offset.

I tried updating to the latest steamVR beta, no change. I tried roomscale rather than standing room only, no change. I tried saving poses from my tracker instead by trying to save a different device number, but this always returned the same value. I tried uninstalling other VR overlays and such, didn't help.

I went back to manual adjustment, this time with the help of OVIE on the desktop. I can't save the offset over the replay without it just compounding the existing offset bug, but I can just save it as a profile in OVIE and then load up the replay and apply the profile to fine tune it. Which also lets me adjust on the fly using VR view, which is useful. As of right now I've got it in the general ballpark, just needs a lot of fine tuning, which OVIE isn't great at.

Started by yamatetsu - Last post by yamatetsu

"Hagar the Horrible'

21 x 30cm, backer board 4mm, Hagar 4mm

Started by geecab - Last post by geecab

Really good work Yolo!

I must admit I haven't made much progress on the airborne front. I've been doing some tidying of the steering changes for hard/race and street drivin'. I think I'm going to start a thread on the bannister mame forum ( https://forums.bannister.org/ubbthreads.php?ubb=postlist&Board=1 ) and ask the mame team for a bit of guidance on how to add a few options that I think we need.

Some interesting-ish things:

- I've noticed the IPT_POSITIONAL control option seems like a good compromise for both mouse and joystick. For mouse it acts like the IPT_DIAL does, and for joystick it acts like an IPT_PADDLE does...
Code: [Select]
PORT_START("mainpcb:12BADC.0")       /* 400000 - steering wheel */
PORT_BIT( 0xfff, 0x800, IPT_POSITIONAL ) PORT_POSITIONS(0xfff) PORT_WRAPS PORT_SENSITIVITY(50) PORT_KEYDELTA(1) PORT_NAME("Steering Wheel")

- Regarding editing the nvram, and the 6 bytes that seem to change when you calibrate your wheel (2 bytes for CNTSPTRN, 2 bytes for PATCEN and finally 2 weird bytes). I think I've worked out those weird bytes are a combination of the CNTSPTRN and PATCEN, added to a strange number. I've posted the latest version of the script below, I've called the weird 2 bytes the 'Edge', and the strange number the  CNTSPTRN and PATCEN are added to I've called the 'Edge base'. I don't really know what they are used for. Anyways, this is handy, because for strreet drivin we are now able to edit the nvram and change the default -98 patcen to 0. I can't seem to change street drivin' CNTSPTRN from 512 to 1024. I can change the nvram, and it gets loaded/accepted by the game ok, but I can tell when I play the game the CNTSPTRN is still fixed to 512.

- Finally, I might take another look at those strange numbers I was reading from another register a while ago (That seemed to change based on steering). I'm wondering if they have something to do with force feedback... maybe...

:)

Code: [Select]
import sys

BYTES_EXPECTED = 2048
EDGE_BASE_HARDDRIV = 0x2C1D
EDGE_BASE_STRTDRIV = 0x295D


def load_byte_array(filename):

    global BYTES_EXPECTED

    with open(filename, mode='rb') as file: # b is important -> binary
        fileContent = file.read().hex()

    data = []
    byte_count = 0
    this_byte = ""
    for c in fileContent:
        this_byte += c
        if len(this_byte) == 2:
            data.append(int(this_byte, 16))
            this_byte = ""
            byte_count += 1

    if byte_count != BYTES_EXPECTED:
        print("Error! Unexpected number of bytes in {}. Expecting={}, actual={} ".format(filename, BYTES_EXPECTED, byte_count))
        exit(1)

    #print("{}".format((fileContent)))
    return data


def save_byte_array(filename, byte_array):
    # make file
    newFile = open(filename, "wb")
    # write to file
    newFileByteArray = bytearray(byte_array)
    newFile.write(newFileByteArray)


def load_nvram(nvram_path):

    global BYTES_EXPECTED

    mainpcb_200e = load_byte_array(nvram_path + "mainpcb_200e")
    mainpcb_210e = load_byte_array(nvram_path + "mainpcb_210e")

    # Combine the data...
    nvram = []
    for i in range(0, BYTES_EXPECTED):
        nvram.append((mainpcb_200e[i] << 8) | mainpcb_210e[i])

    return nvram

def save_nvram(nvram_path, nvram):

    global BYTES_EXPECTED

    mainpcb_200e = []
    mainpcb_210e = []

    # split the data...
    for i in range(0, BYTES_EXPECTED):
        mainpcb_200e.append((nvram[i] >> 8)&0xff)
        mainpcb_210e.append(nvram[i]&0xff)

    save_byte_array(nvram_path + "mainpcb_200e", mainpcb_200e)
    save_byte_array(nvram_path + "mainpcb_210e", mainpcb_210e)


def patcen_to_int(patcen):
    if (patcen&0xf000) == 0xf000:
        return -1 * (0x1000 - patcen&0x0fff)
    else:
        return patcen


def int_to_patcen(i_patcen):

    if i_patcen < 0:
        return 0xf000 | (0x1000 + i_patcen)
    else:
        return i_patcen


def get_edge(cntsptrn, patcen, start_edge, undo=False):

    edge = start_edge
    i_patcen = patcen_to_int(patcen)

    # Leave the sign 'as is' when undoing, flip the sign when redoing...
    cntsptrn *= 1 if undo else -1
    i_patcen *= 1 if undo else -1

    edge += cntsptrn
    edge += i_patcen

    return edge


def validate_edge_base(edge_base, exit_on_error=True):

    if edge_base == EDGE_BASE_HARDDRIV:
        print("Hard/Race Drivin' style edge detected - OK".format(hex(edge_base)))
    elif edge_base == EDGE_BASE_STRTDRIV:
        print("Street Drivin' style edge detected - OK".format(hex(edge_base)))
    else:
        print("Error! Unexpected edge base {} detected. Expecting either Hard/Race Drivin' edge base {} or Street Drivin' edge base {})".format(hex(edge_base),hex(EDGE_BASE_HARDDRIV), hex(EDGE_BASE_HARDDRIV)))
        if exit_on_error:
            if input('Continue anyway?') != 'y':
                exit(0)


def do_read(nvram_path):

    nvram = load_nvram(nvram_path)
    cntsptrn = "?"
    patcen = "?"
    edge = "?"

    for i in range(0, BYTES_EXPECTED):
    #for i in range(0x210, 0x218):
        temp = "ADDR:0x{:04X} - 0x{:04X} {:<8}".format(i, nvram[i], f"({nvram[i]})")
        if i == 0x212:
            temp = temp + " CNTSPTRN"
            cntsptrn = nvram[i]
        elif i == 0x213:
            temp = temp + " PATCEN"
            patcen = nvram[i]
        elif i == 0x214:
            temp = temp + " EDGE"
            edge = nvram[i]

        print(temp)

    i_patcen = patcen_to_int(patcen)
    print(f"Read complete. CNTSPTRN:{hex(cntsptrn)} ({cntsptrn})     PATCEN:{hex(patcen)} ({i_patcen})  EDGE:{hex(edge)}")

    # Check the edge looks right...
    edge_base = get_edge(cntsptrn, patcen, edge, undo=True)
    validate_edge_base(edge_base, exit_on_error=False)


def do_diff(nvram_path_a, nvram_path_b):

    global BYTES_EXPECTED

    a = load_nvram(nvram_path_a)
    b = load_nvram(nvram_path_b)

    diff_count = 0
    for i in range(0, BYTES_EXPECTED):
        if a[i] != b[i]:
            temp = "ADDR:0x{:04X} - A:0x{:04X} {:<8} DIFF B:0x{:04X} {:<8}".format(i, a[i], f"({a[i]})", b[i], f"({b[i]})")
            if i == 0x212:
                temp = temp + " CNTSPTRN"
            elif i == 0x213:
                temp = temp + " PATCEN"
            diff_count += 1
            print(temp)

    print(f"{diff_count} differences detected.")


def do_reset(nvram_path, cntsptrn, i_patcen):

    nvram = load_nvram(nvram_path);

    # Check the edge looks right and if it doesn't, ask user if they want to continue...
    edge_base = get_edge(nvram[0x212], nvram[0x213], nvram[0x214], undo=True)
    validate_edge_base(edge_base, exit_on_error=True)

    cntsptrn = cntsptrn
    patcen = int_to_patcen(i_patcen)
    edge = get_edge(cntsptrn, patcen, edge_base, undo=False)

    nvram[0x212] = cntsptrn
    nvram[0x213] = int_to_patcen(i_patcen)
    nvram[0x214] = edge

    save_nvram(nvram_path, nvram)

    print(f"CNTSPTRN reset to {cntsptrn}, PATCEN reset to {i_patcen}. OK")

def clean_path(my_path):
    if not my_path.endswith('/'):
        my_path = my_path + '/'
    return my_path

def show_usage():
    print("Nvram Helper")
    print("------------")
    print("")
    print("Usage:")
    print("    python3 nvram_helper.py read  <nvram_directory>")
    print("    python3 nvram_helper.py diff  <nvram_directory_a> <nvram_directory_b>")
    print("    python3 nvram_helper.py reset <nvram_directory> <cntsptrn> <patcen>")

    print("Examples:")
    print("    python3 nvram_helper.py read nvram/harddrivcb")
    print("    python3 nvram_helper.py diff nvram/harddrivcb nvram/strtdriv")
    print("    python3 nvram_helper.py reset nvram/harddrivcb 1024 0")
    print("    python3 nvram_helper.py reset nvram/racedrivcb 1024 0")
    print("    python3 nvram_helper.py reset nvram/strtdriv 512 0")
    exit(0)


#print("{}".format(sys.argv))

if len(sys.argv) < 2:
    show_usage()

cmd = sys.argv[1]
if cmd == 'read':
    if len(sys.argv) < 3:
        print(f"Not enough arguments.")
        exit(1)
    do_read(clean_path(sys.argv[2]))

elif cmd == 'diff':
    if len(sys.argv) < 4:
        print(f"Not enough arguments.")
        exit(1)
    do_diff(clean_path(sys.argv[2]), clean_path(sys.argv[3]))

elif cmd == 'reset':
    if len(sys.argv) < 5:
        print(f"Not enough arguments.")
        exit(1)
    do_reset(clean_path(sys.argv[2]), int(sys.argv[3]), int(sys.argv[4]))

elif cmd.lower() in ["h", "-h", "help", "/help", "/h", "?", "--h"]:
    show_usage()

else:
    print(f"Unknown command '{cmd}'.")
    show_usage()

4   Main Forum / Re: thin client pcon Today at 02:45:31 am

Started by daywane - Last post by daywane

Wife gave in today. the 16 gig m.2 is just to small for what I want. A new 256 gig m,2 is on order.
there is 3 programs that I have been using that are very help full for a project like this.
1st is Ventoy2Disk . It will let you put multiple ISO on a single thumb drive and run them. not windows ISO's that  I put in but others Heck yea .
2ns. is snappy driver. HUGE download! 40 gig. in a windows computer it will install all your drivers!
3rd . Hasleo WinToUSB, this is a nice program that will turn a windows ISO into a install thumb drive.
windows 11 was real slow on the thin client.
windows 10 was OK for you tube and internet stuff. game's NOPE
Windows 7 after drivers I ran out of disk space. tiny windows installs was a pain in the but!
Windows 7 looked very promising but I ran out of drive installing direct x9
Prime OS and Batocera, I was not happy with.
Linux Mint looks very promising also. I did not want to install Linux  to my only M.2 drive. ( i do not know how to reformat a M.2 drive after a Linux install) Now I have a second drive coming in I might install .
I did build a junk PC from parts I have around and tossed Mint on it to learn about Linux. Mint is not that bad. every thing like icons , pointer and text  is VERY SMALL! maybe because I am on a 50" TV. I am  working on that now

Started by howarejew - Last post by howarejew

5/5/24 Update: Dynamic Mini Marquee using Marquee Masher in GameEx






Started by projectguy - Last post by projectguy

To give you an idea of the project scope the following pictures are a snap shot of my previous project cabinet.





Started by saint - Last post by projectguy

Galaga

Started by saint - Last post by projectguy

cabinet

Started by bbegin - Last post by jametheth

So after much fiddling around, I managed to get a working install of 64bit Raspbian Lite 12 Bookworm, MAME 0265, Hypseus 2.11.2, and the latest Attract-Mode Plus 3.0.8 frontend.

I decided to share this image here to show some love to this project, not to step on the OP's toes in anyway!

I will gladly remove the link if this is problematic!





Download Here
rpi4b.raspios12.mame-0265.AMP.base.clean.tar.xz

https://drive.google.com/file/d/1Va3d9nI_bsQAfLi6bF8DWGdAohj6Fyoe/view?usp=sharing



I have all the same scripts that the OP included in his setup / guide, all of the original stuff applies.

My changes are;



64bit Raspbian Lite 12 "Bookworm"
MAME 0265
Hypseus 2.11.2
Attract-Mode Plus 3.0.8


No AdvancedMenu
Note - I didn't bother with AdvancedMenu, as I see it as pointless when AttractMode exists.

Attract-Mode Plus instead of Attract-Mode - https://github.com/oomek/attractplus/tree/master
Note - I changed the executable name in /usr/local/bin/ from "attractplus" to "attract" rather then change the name in all the original scripts and locations.

Launch Decorator plugin for AttractMode added. - https://github.com/matteocedroni/am-launch-decorator-plugin?tab=readme-ov-file
Note - Disabled by default.  I use this as a way to trigger a script on rom launch.  In particular I use it to trigger a TOS GRS switchable 4 to 8 way restrictor to switch mode based on the game being launched.  This is configured already for this purpose if you turn it on in AttractMode and set the script directory to /home/pi/.attract/plugins/LaunchDecorator/scripts/  and script extension to .sh


TOS GRS Switchable 4-to-8 way restrictor plate software located in /home/pi/roms4way/   -  https://thunderstickstudio.com/products/tos-grs-4-to-8-way-restrictor-all-in-one-kit
Note - This is used in conjunction with the Launch Decorator plugin in AttractMode.

GPIOnext installed for use of GPIO as buttons.  -  https://github.com/mholgatem/GPIOnext
Note - Installed, daemons running, not configured.

AttractModePlus is set up as default frontend.
Note - AttractMode auto setup the MAME emulator in AM.  It seems to be all good, though I wonder about the dir it chose for "emulator working directory".  Surely wrong, but everything seems to work.


Everything is in horizontal "non-rotated" configuration.
Note - I included the notes from the original guide for switching everything to a vertical rotation.  Located in /home/pi/notes.txt



I think that is about all I changed from the original design.


There are some differences in parts of the system and setup process when using the latest Raspbian 12 Bookworm, but everything seems to be working right, though I have not tested Hypseus.

Note that in Raspbian 12, /boot/cmdline.txt and /boot/config.txt are now located in /boot/firmware/cmdline.txt and /boot/firmware/config.txt

While setting all this up, I had some issues with the RO file system setup script in particular, but I seem to have got it all sorted out.

I have shrunk this down as small as I could, this could be flashed to an 8gb sd card in a pinch.
The root partition is pretty small, but should be fine for most uses.  It might be a problem if you try to compile new versions of MAME in your home DIR or elsewhere on the root partition.


SSH is on.
Hostname is arcade.
User pi, password raspberry.


Don't forget to do the included "expand-data-partition.sh" script, and setup wifi, locale, hostname etc as needed with raspi-config.

Enjoy!




Started by Klipp - Last post by Klipp

Ok so here's the results (in case anyone else has this problem and wishes to know)

Even thought there is a calibration requirement upon powering up (and I do the calibration... turn wheel all the way to the left and hit the button, turn wheel all the way to the right and hit the button, stop on gas all the way, step on brake all the way), that didn't do anything.

HOWEVER, when I went into the menu and went to calibration and did *exactly* the same thing, it fixed the problem. The flames came back from a double pump and I am now able to go over 100 mph.

Woo hoo!! Thanks everyone for your great help and advice.

Kim
Pages: [1] 2 3 ... 10