Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPC-Emu cleanup round #138

Closed
neophob opened this issue Nov 8, 2019 · 2 comments
Closed

WPC-Emu cleanup round #138

neophob opened this issue Nov 8, 2019 · 2 comments
Assignees
Labels
emulation Something to do with ROM emulation

Comments

@neophob
Copy link
Contributor

neophob commented Nov 8, 2019

#124 was about a first working WPC-Emu integration. there are some issues I want to address here:

DONE

  • use module.exports for wpc-emu lib, today the facade use the modules export. reason: some unit tests fail running in node
  • check architecture about the wpc-emu, its caching mechanism - maybe use a proxy?

PENDING

  • use run function to start the emulator, use stop function to stop the emulator
@neophob
Copy link
Contributor Author

neophob commented Nov 8, 2019

There's is another issue - in the test menu, there is a ALL LAMP test menu item, where all lamps flash - ChangedLamps returns this data:

changedLamps
0: (2) [81, 1]
1: (2) [82, 1]
2: (2) [83, 1]
3: (2) [84, 1]
4: (2) [85, 1]
5: (2) [86, 1]
6: (2) [87, 1]
7: (2) [88, 1]

As the VBS code has not all 64 lamps available, this crashes the VBS code:

Uncaught TypeError: Cannot set property 'State' of undefined
    at TimerApi.eval (tablescript.js:39)
    at TimerApi.emit (events.js:146)
    at EventProxy.fireDispID (event-proxy.js:52)
    at EventProxy.fireGroupEvent (event-proxy.js:46)
    at PlayerPhysics.updatePhysics (player-physics.js:307)
    at Player.updatePhysics (player.js:84)
    at player.worker.js:61

Here is tablescript.js

    __items.PinMAMETimer.on('Timer', () => {
        let ChgLamp, ii, tmp, idx;
        ChgLamp = __vbsHelper.getOrCall(__vbsHelper.getOrCall(__scope.Controller).ChangedLamps);
        if (!__stdlib.IsEmpty(ChgLamp)) {
            for (ii = 0; ii <= __stdlib.UBound(ChgLamp); ii += 1) {
                idx = __vbsHelper.getOrCall(ChgLamp, ii, 0);
                __vbsHelper.getOrCall(__scope.Lights, idx).State = __vbsHelper.getOrCall(ChgLamp, ii, 1);  << BOOM
            }
        }

Goal is that EMU Test "T.10" works

Should be fixed when #141 is implemented

@freezy freezy added the emulation Something to do with ROM emulation label Nov 10, 2019
@neophob
Copy link
Contributor Author

neophob commented Nov 11, 2019

start/stop/pause is not needed, cleanup round is made, the vbs error will be handled with #141, that means nothing left to do here

@neophob neophob closed this as completed Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emulation Something to do with ROM emulation
Projects
None yet
Development

No branches or pull requests

2 participants