(Topic ID: 232695)

WPC Emulator in your Browser


By neophob

1 year ago



Topic Stats

  • 68 posts
  • 19 Pinsiders participating
  • Latest reply 82 days ago by altan
  • Topic is favorited by 29 Pinsiders

You

Linked Games

No games have been linked to this topic.

    Topic Gallery

    There have been 5 images uploaded to this topic. (View topic image gallery).

    Screenshot 2020-04-21 at 22.56.53 (resized).png
    oblivion_ui.jpg
    2 (resized).png
    1 (resized).png
    bitmap (resized).PNG

    There are 68 posts in this topic. You are on page 1 of 2.
    20
    #1 1 year ago

    Hi all

    I just released a new version of the WPC-EMU - that emulates the Williams Pinball Machine in your browser. All available ROM's are runnable (except "The Pinball Circus" - as I could not find a dump).

    https://neophob.github.io/wpc-emu/

    Enjoy!

    #2 1 year ago

    Very cool - nicely done.

    #3 1 year ago

    Nice!

    #4 1 year ago

    Freaking impressive. Very nice work.

    #5 1 year ago

    An ingenious idea with a nice layout. Can't get it to run in Google Chrome, however.

    #6 1 year ago

    Wow, I probably played with this for a solid 20 minutes. I always felt PinMAME's switch matrix input lacked the ability to really influence game events because there was no way to keep switches pressed down (to lock a ball, for example). This makes it easy! It works for me in Chromium (based on Chrome) but the sound does not work. The emulator doesn't work at all in Internet Explorer. I haven't tested any other browsers.

    This is fantastic, for people who want to rip or record DMD animations this is absolutely perfect to trigger specific events!

    #7 1 year ago

    Fantastic work! Looking forward to the debugger interface and more playfields being added.

    Works fine in Firefox.

    #8 1 year ago
    Quoted from Quench:

    Fantastic work! Looking forward to the debugger interface and more playfields being added.
    Works fine in Firefox.

    Yes, runs good in Firefox but no sound there either (perhaps sound is still a WIP).

    Haven't tried it in Microsoft Edge.

    #9 1 year ago

    That is amazing, what are all the extra dmd frames at the bottom? are these internal dmd buffers used by the dev to create the final rendering? if so very cool.

    #10 1 year ago

    Is this PinMAME based or completely new?

    #11 1 year ago

    Bump for this awesome emulator!

    #12 1 year ago

    Goddamn this is awesome!

    #13 1 year ago

    Any chance of getting an option to upload custom roms to this?

    #14 1 year ago

    Being able to save a machine's configuration/setup -- perhaps as browser cookies -- would rule BIG time.

    #15 1 year ago
    Quoted from SonicZone:

    Being able to save a machine's configuration/setup -- perhaps as browser cookies -- would rule BIG time.

    Agreed!

    #16 1 year ago

    has any one got audio working on this? looks like it should support wpc audio but i just get a few dings at the start and nothing else.

    #17 1 year ago
    Quoted from russdx:

    has any one got audio working on this? looks like it should support wpc audio but i just get a few dings at the start and nothing else.

    From the github link - sound emulation isn't complete:

    Sound Board
    ~ load pre DCS sound ROM files ✓
    ~ load DCS sound ROM files ✗
    ~ Bank Switching ✓
    ~ Resample audio to 44.1khz ½
    ~ emulate 6809 CPU ✓
    ~ emulate YM2151 FM Generator ½
    ~ emulate HC-55536 CVSD ✗ (speech synth)
    ~ emulate MC6821 PIA ✓
    ~ emulate DAC ✓

    Quoted from Crash:

    Is this PinMAME based or completely new?

    It looks new - but appears to have used existing emulation as a reference.

    #18 1 year ago

    .

    #19 1 year ago

    Thanks for all the replies! I try to answer the open questions.

    Quoted from Crash:

    Wow, I probably played with this for a solid 20 minutes. I always felt PinMAME's switch matrix input lacked the ability to really influence game events because there was no way to keep switches pressed down (to lock a ball, for example). This makes it easy! It works for me in Chromium (based on Chrome) but the sound does not work. The emulator doesn't work at all in Internet Explorer. I haven't tested any other browsers.
    This is fantastic, for people who want to rip or record DMD animations this is absolutely perfect to trigger specific events!

    Thanks, sound is currently not emulated, I work on that. I ignore Internet Explorer - but it should work on all current browsers including stock iOS.

    Quoted from Quench:

    Fantastic work! Looking forward to the debugger interface and more playfields being added.
    Works fine in Firefox.

    I'm looking for contributors on this project, feel free to open a pull request on https://github.com/neophob/wpc-emu. Adding new playfields and adding lamp positions should be pretty easy (really, it is easy ) - just take a look at the game entry "client/scripts/hurricane.js". Let me know if something is unclear, I'll update the readme to clarify thing...

    Quoted from Crash:

    Is this PinMAME based or completely new?

    I used PinMame and FreeWPC as source to get information, but the emulator itself is written from scratch.

    Quoted from russdx:

    That is amazing, what are all the extra dmd frames at the bottom? are these internal dmd buffers used by the dev to create the final rendering? if so very cool.

    This shows the internal ram of the DMD board, each of those ram pages are toggled to create the different brightness of the LED output

    Quoted from lurch:

    Any chance of getting an option to upload custom roms to this?

    Let me know what you need, are you talking about different ROM versions or other homebrew ROMs?

    Quoted from SonicZone:

    Being able to save a machine's configuration/setup -- perhaps as browser cookies -- would rule BIG time.

    you mean to store the whole state of the pinball machine? or are you talking about the switch state?

    Quoted from pinballsp:

    Interesting your project, congratulations, hope soon work the sound to can test all.
    I suggest add trigger to play external customized sounds (WAV in SD card), output for real DMD or at least serial output data similar to pinmame to work with real DMD.
    In your hardware notes you say about use Teensy, Arduino or ESP32, I suggest NXP RT1020, its the microcontroller for the future Teensy 4, a very powerful Cortex M7 500 Mhz and cheaper than Kinetis used in Teensy 3.5/3.6. With one RT1020, can run a real multicolor DMD and control all input/output for switches and power outputs, may be even can play external sounds.
    For input hardware, instead of opto couplers, you can use level adapter buffers like the HEF4050.

    My plan is to synchronise a real pinball machine with the emulator - to validate the emulator works correct. I wrote already a firmware for the esp32 board - as I can use web bluetooth. thats definitive easier than using a serial connection and works "out of the box" with a recent browser.

    Currently I'm looking for a payable WPC pin in Switzerland - let me know if you want to support this project

    #20 1 year ago
    Quoted from neophob:

    Quoted from lurch:
    Any chance of getting an option to upload custom roms to this?

    Let me know what you need, are you talking about different ROM versions or other homebrew ROMs?

    I was thinking homebrew. It would be sweet to be able to load roms into this for testing. Ive been playing around with a Roadshow rom, but have no real place to test it other than to burn it and see what happens.

    Not a big deal though, i dont want you killing yourself to implement that.

    #21 1 year ago

    .

    #22 1 year ago
    Quoted from lurch:

    I was thinking homebrew. It would be sweet to be able to load roms into this for testing. Ive been playing around with a Roadshow rom, but have no real place to test it other than to burn it and see what happens.
    Not a big deal though, i dont want you killing yourself to implement that.

    probably the easiest way would be check out the github repo and add it locally, let me know if you need help

    #23 1 year ago
    Quoted from pinballsp:

    The wireless connection can be a problem in electromagnetically noisy environments, such as a real pinball machine. You can have many problems of loss of communication or failure in the transmission of data, personally I think the best thing is a wired communication, either by Serial port or USB.
    I can collaborate in the design, programming and manufacturing of hardware compatible with your software. For example, a controller that receives/send data from/to your software, to process the inputs/outputs, that also controls a multicolor real DMD. And a sound system with a digital amplifier in class D and a WAV sound player that store sound files in SD card to allow that user can customize the machine with his own sounds that replace the originals.
    Basically they are the improvements that I have commented to you, that imply that your software send the information of the frames of the DMD (in the same way that now it does it pinmame), and that send also information to trigger external sounds. That in addition to the exchange of input/output data, between software and hardware.

    I use the simplest solution for now (BLE) - as it *should* work thanks to frequency hopping, but I'll know once I've implemented it...

    about the DMD output - thats a nice idea, also because color DMD animation is also on my TODO list. What output format does pinmame use? raw dmd frames send out via REST? serial?

    #24 1 year ago

    .
     

    #25 1 year ago
    Quoted from pinballsp:

    The wireless connection can be a problem in electromagnetically noisy environments, such as a real pinball machine. You can have many problems of loss of communication or failure in the transmission of data, personally I think the best is a wired communication, either by Serial port or USB.
    I can collaborate in the design, programming and manufacturing of hardware compatible with your software. For example, a controller that receives/send data from/to your software, to process the inputs/outputs, that also manages a multicolor real DMD, and a sound system with a digital amplifier in class D and a WAV sound player that store sound files in SD card to allow that user can customize the machine with his own sounds that replace the originals. This board can also include the power output with MOSFET to replace totally the original WPC boards by one "all in one" board.
    Basically they are the improvements that I have commented to you, that imply that your software send the information of the frames of the DMD (in the same way that now it does it pinmame), and that send also information to trigger external sounds. That in addition to the exchange of input/output data, between software and hardware.

    if wireless is such an issue why did you stick wifi modules on all of your boards??? couple years ago you was telling us wireless inside the pinball was the perfect solution and you was goin to have a wireless topper etc...... yet now its bad?

    also if it was such a bad idea products like pinstadium would just not work.

    #26 1 year ago
    Quoted from neophob:you mean to store the whole state of the pinball machine? or are you talking about the switch state?

    Game adjustment+bookkeeping menu data. In other words, what the game's batteries or NVRAM board drop-in replacements for batteries would normally retain between power cycles. Sorry if I wasn't clear on that.

    #27 1 year ago
    Quoted from SonicZone:

    Game adjustment+bookkeeping menu data. In other words, what the game's batteries or NVRAM board drop-in replacements for batteries would normally retain between power cycles. Sorry if I wasn't clear on that.

    thanks for clarify! good point to persist the nvram (https://github.com/neophob/wpc-emu/issues/22)

    #28 1 year ago
    Quoted from neophob:

    thanks for clarify! good point to persist the nvram (https://github.com/neophob/wpc-emu/issues/22)

    could also use local browser storage, js as nice api for it.

    #29 1 year ago

    -removed: Fake/duplicate accounts are not allowed on Pinside.-

    #30 1 year ago
    Quoted from Sicko_Fual:

    -removed: Fake/duplicate accounts are not allowed on Pinside.-

    thanks for the heads up
    about storing/dumping DMD frames, I created https://github.com/neophob/wpc-emu/issues/20. Thats a generic approach, it could be used to dump the frames but also to send the frames to an external (color) DMD. let me know if you have more input.

    #31 1 year ago
    Quoted from neophob:

    thanks for the heads up
    about storing/dumping DMD frames, I created https://github.com/neophob/wpc-emu/issues/20. Thats a generic approach, it could be used to dump the frames but also to send the frames to an external (color) DMD. let me know if you have more input.

    could there be a simple start/stop record button and then just save the frames out as json or a simple txt file? could be really simple.

    #32 1 year ago
    Quoted from russdx:

    could there be a simple start/stop record button and then just save the frames out as json or a simple txt file? could be really simple.

    I could, but then its hard to export those data from the browser.
    I guess I'll implement the generic solution, but add a simple tool to dump the frames as example

    #33 1 year ago
    Quoted from neophob:

    thanks for the heads up
    about storing/dumping DMD frames, I created https://github.com/neophob/wpc-emu/issues/20. Thats a generic approach, it could be used to dump the frames but also to send the frames to an external (color) DMD. let me know if you have more input.

    Sorry for having raised some expectations I can’t fullfill...

    Im just a moron hanging around here with a fake account and some basic knowledge about trustworthy people.

    Russdx made a good suggestion. The normal way Pin2dmd works is storing the frames in a text file. It gets zipped and can be imported into Pin2dmd editor.

    For now the biggest issue is to get complete dumps which could be solved with your browser project.

    #34 1 year ago
    Quoted from neophob:

    I could, but then its hard to export those data from the browser.
    I guess I'll implement the generic solution, but add a simple tool to dump the frames as example

    i use this solution alot at work, it basically downloads any file you want from js from any browser ie the frame data in any format you want a quick easy way to get data out of js apps.

    example
    https://codepen.io/davidelrizzo/pen/cxsGb

    #35 1 year ago
    Quoted from russdx:

    i use this solution alot at work, it basically downloads any file you want from js from any browser ie the frame data in any format you want a quick easy way to get data out of js apps.
    example
    https://codepen.io/davidelrizzo/pen/cxsGb

    well thats the pure download, which is not the problem. its more the caching that needs to be done UNTIL you download the frames. one frame need approx 1600 bytes. if i assume 10 fps on average thats 16k per second or more or less 1MB per minute.
    one option is to restrict the maximal record time to 1 minute, would that make sense? or how do you rip those dmd frames?

    I just want to understand how you work before I implement something useless...

    #36 1 year ago
    Quoted from neophob:

    well thats the pure download, which is not the problem. its more the caching that needs to be done UNTIL you download the frames. one frame need approx 1600 bytes. if i assume 10 fps on average thats 16k per second or more or less 1MB per minute.
    one option is to restrict the maximal record time to 1 minute, would that make sense? or how do you rip those dmd frames?
    I just want to understand how you work before I implement something useless...

    Does not make sense to me. The goal is to have every possible animation recorded. Currently this is done on a real pinball machine with the glass off and rolling the ball by hand to trigger all events with dmd scenes. The same method is used with vpin except that you guide the ball with the mouse pointer.

    #37 1 year ago
    Quoted from lucky1:

    Does not make sense to me. The goal is to have every possible animation recorded. Currently this is done on a real pinball machine with the glass off and rolling the ball by hand to trigger all events with dmd scenes. The same method is used with vpin except that you guide the ball with the mouse pointer.

    what do you suggest make sense: longer time? record a specific animation (using a start/stop button)? something else?

    #38 1 year ago

    Here we go, I just release v0.8.10 (https://neophob.github.io/wpc-emu/) - major change is the ability to save and load one state of each game.

    let me know if you find some issues. It tested it rather good, but looking for feedback

    #39 1 year ago

    Wooow very very nice neophob!

    #40 1 year ago
    Quoted from neophob:

    what do you suggest make sense: longer time? record a specific animation (using a start/stop button)? something else?

    Record with a start stop button is a good idea.

    #41 1 year ago

    v0.8.11 released, I added a "MIDNIGHT MADNESS" button to set the pinball time to 23:59:45. This allows to enjoy some fancy madness mode

    #42 1 year ago

    v0.8.14 released (https://neophob.github.io/wpc-emu/). major new feature is a DMD animation exporter (raw format).

    I'm looking for some feedback if the animation exporter is usable or if there any issues. Would be great to get some feedback.

    Cheers

    #43 1 year ago

    Anybody had time to play around with the DMD ripper? I'm wondering if its usable..

    #44 1 year ago

    I loaded the .raw file in to Tile Molester (bitmap viewer) and got this:

    bitmap (resized).PNG

    It's the Hurricane logo. Not sure if it's supposed to look this way viewed in a two color (1 bit per pixel) format.

    #45 1 year ago

    The dump itself is working fine but it is hard to find and trigger the switch sequences by hand. Maybe simulating a ball running through a ramp which triggers the enter ramp and shortly after the made ramp switches would be helpful. Something like grouping switches together. Also when the dump is running you can save the file when the buffer is full but continue to record and save the next file without the header. That way you will end up with a sequence of raw files which could be joined together using something like copy /b

    #46 1 year ago
    Quoted from Crash:

    I loaded the .raw file in to Tile Molester (bitmap viewer) and got this:
    [quoted image]
    It's the Hurricane logo. Not sure if it's supposed to look this way viewed in a two color (1 bit per pixel) format.

    thanks - it's not a raw image data but a raw dmd frame dump (header, 3x raw and unshaded dmd image frame).

    Quoted from lucky1:

    The dump itself is working fine but it is hard to find and trigger the switch sequences by hand. Maybe simulating a ball running through a ramp which triggers the enter ramp and shortly after the made ramp switches would be helpful. Something like grouping switches together. Also when the dump is running you can save the file when the buffer is full but continue to record and save the next file without the header. That way you will end up with a sequence of raw files which could be joined together using something like copy /b

    I see. Currently this logic part is not implemented, but on the roadmap. that should solve some issues with starting some pins too

    #47 1 year ago
    Quoted from neophob:

    I see. Currently this logic part is not implemented, but on the roadmap. that should solve some issues with starting some pins too

    Maybe make these sequences configurable in the table config files. That way you could also simulate bumpers etc.

    For the dump you could also add a merge routine for the files already stored on the harddisk when the dump is stopped and maybe pause the game during the save routine that no frames are lost.

    #48 1 year ago
    Quoted from neophob:

    thanks - it's not a raw image data but a raw dmd frame dump (header, 3x raw and unshaded dmd image frame).

    how do you open the raw file? on my side I got this from editor and dmd extractor:

    Whait is it supposed to be? a set of pictures, txt files with 1, 2, 3... ?

    thanks

    1 (resized).png2 (resized).png
    #49 1 year ago

    With the pin2dmd editor you can load it as a recording. Larger files should be gzipped.
    You can lookup the fileformat in the pinmame source (core.c I think)

    #50 1 year ago

    Holly crap this is cool

    Promoted items from the Pinside Marketplace
    $ 9.99
    Eproms
    Matt's Basement Arcade
    $ 625.00
    Flipper Parts
    Mircoplayfields
    $ 122.00
    Playfield - Toys/Add-ons
    Lermods
    $ 36.00
    Playfield - Toys/Add-ons
    bB Customs
    $ 90.00
    Lighting - Under Cabinet
    Rock Custom Pinball
    $ 156.00
    Playfield - Toys/Add-ons
    ModFather Pinball Mods
    $ 79.99
    Cabinet - Armor And Blades
    PinGraffix Pinside Shop
    From: $ 220.00
    $ 44.95
    Playfield - Toys/Add-ons
    PinBoss Mods
    $ 96.95
    Cabinet - Shooter Rods
    Super Skill Shot Shop
    $ 8,999.00
    Pinball Machine
    Great American Pinball
    $ 99.99
    Playfield - Toys/Add-ons
    Lighted Pinball Mods
    $ 7,899.00
    Pinball Machine
    Classic Game Rooms
    $ 9.99
    Tools
    PinShield
    $ 69.99
    Playfield - Toys/Add-ons
    Lighted Pinball Mods
    $ 750.00
    Cabinet - Toppers
    Great American Pinball
    $ 139.00
    Playfield - Toys/Add-ons
    Sparky Pinball
    $ 229.00
    Lighting - Led
    PinballBulbs
    $ 7.00
    From: $ 9.99
    $ 150.00
    Cabinet - Shooter Rods
    Great American Pinball
    £ 55.00
    Lighting - Led
    PinballToys
    $ 229.99
    Lighting - Led
    PinballBulbs
    $ 9.95
    There are 68 posts in this topic. You are on page 1 of 2.

    Hey there! Got a moment?

    Great to see you're enjoying Pinside! Did you know Pinside is able to run thanks to donations from our visitors? Please donate to Pinside, support the site and get anext to your username to show for it! Donate to Pinside