Giter Club home page Giter Club logo

playma.me's Introduction

Play MAME

React WASM WebRTC

Notes:

keyboard keys https://github.com/emscripten-ports/SDL2/blob/1d03c6824752d71d44c7e7ea3dd28909deda9659/include/SDL_keycode.h always release(0) after press(1)

metal slugs

2p
a -> shoot
s -> jump
q -> bomb
d -> left
f -> down
r -> up
g -> right



SDL keys

pause = JSMAME.sdl_sendkeyboardkey(1, 19)
credit = JSMAME.sdl_sendkeyboardkey(1, 34)
19 -> pause
34 -> credit
35 -> p2.credit
41 -> fuk
60 -> soft_reset?
61 -> palette
64 -> load state
43 -> tab settings
53 -> vol ctrl?

30 -> p1.start
31 -> p2.start

82 -> p1.up
80 -> p1.left
81 -> p1.down
79 -> p1.right
224 -> p1.shoot -> A
226 -> p1.jump -> B
44 -> p1.bomb -> C
225 -> p1.special -> D

21 -> p2.up
7 -> p2.left
9 -> p2.down
10 -> p2.right
4 -> p2.shoot -> A
22 -> p2.jump -> B
20 -> p2.bomb -> C
26 -> p2.special -> D

foo = (i) => {
  JSMAME.sdl_sendkeyboardkey(1, i)
  setTimeout(() => JSMAME.sdl_sendkeyboardkey(0, i), 100)
}

k = 100
for (let i = 70; i < 300; i++) {
  if ([19, 41, 61, 64, 43, 53].includes(i)) {
    continue;
  }
  setTimeout(() => {
    console.log(i)
    foo(i)
  }, i * 1000)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.