Code Monkey home page Code Monkey logo

6502.ts's People

Contributors

alexpoulsen avatar christopherstock avatar cnspeckn avatar dirtyhairy avatar hairy-nonpriv avatar mschroeder avatar stesie avatar zeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

6502.ts's Issues

Frameskip option for mobile

Experimentating shows that the bottleneck on mobile is keeping up with 60 FPS --- worker messages start piling up, leading to slowdowns. This might be related to vsync and might also impair desktop class machines with vsync enabled.

Implementing a frameskip option would ameliorate this and allow for full speed emulation on the faster range of ARM devices. However, the implementation is not entirely straightworkward as the skipped frames must be merged in order to play well with sprite flickering.

Necessary steps:

  • Implement an adapter on top of VideoEndpoint that merges two or more consecutive frames, optionally utilizing a worker.
  • Make frame merging in the WebGL renderer configurable in order to compensate for the already pre-merged frames.
  • Expose frameskip as an option within stellerator

Scheduling improvements

The current scheduler is parameterized with a fixed number of cycles and works with variable timings. In order to do #44 we need the opposite: a scheduler that keeps emulation time ahead of wall clock time by a defined margin (otherwise, the audio buffer will underrun).

Constant background hum in Vong demos

This is basically a copy of the exact same issue from Stella: stella-emu/stella#104. I've decided to put it off until I get to the new sound core, as you probably will as well. But the symptoms are the same in Stella and Stellerator (background hum), which are not present in other emulators tested (MAME, javatari, z26, etc).

Investigate ARM support for DPC+

Investigate the usage of third-party ARM emulation code for supporting ARM functionality in DPC+. Withhout digging deeper, two options come to mind:

  • arm-js looks like a promising candidate, but it seems that Thumb support is missing, and the code suggests that a sizeable part of the regular ARM instruction set is missing, too.
  • Porting the thumbulator via Emscripten (ASM.js or possible even WASM). The Thumbulator is used by Stella and should work nicely; however, it would be nicer to use something different in order to have a complementary implementation.

Undocumented Opcodes

The CPU currently lacks support for undocumented opcodes. This keeps some games (especially) homebrew from running.

DPC+ (no ARM)

Support DPC+ ROMs, minus the VCS / ARM bridge stuff.

Reset is broken

Reset is currently broken. Emulation restarts and runs, but no frames are generated (audio is OK though).

Improved vsync / vblank handling and frame detection

Frame detection currently ignores vsync and is solely based on vblank. This affects display in a numbe of games:

  • Summer Games, Winter Games (shifted title screen)
  • James Bond (no display at all)
  • Enduro (lower screen cut of)
  • Most tigervision games (lower screen cut off, flicker)

Fix CPU memory access patterns

In it's current incarnation, the CPU does not emulate memory access correctly. In particular, several writes / reads can happen in a single cycle. The most importand cases are treated correctly (loads and stores happen in the last cycle), but some VCS ROMs are glitched (most prominently Pole Position).

Fixing this will require to turn each instruction into a full state machine. As a first step, it would be enough to turn address decoding into state machines, fully implement the most critical instructions (JSR, RTS, PHA, PHP, etc.) and wrap the others.

Scheduling issues in Chrome 59

In Chrome 59 (and possibly higher), deactivating the frame limiter stalls the event loop and leaves the emulation unresponsive.

Random values for undefined reads

Undefined reads (e.g.undefined TIA registers) currently yield zero. This prevents Haunted House from running. Random values (cf. #10) should do the trick.

Horizontal positioning issues

In a handful of games, minor horizontal positioning issues remain:

  • Atari Video Cube
  • Masters of the Universe
  • Edtris (Homebrew)

Games with issues

This is a tracking ticket for games with known issues.

  • Frog's n Flies NTSC: game verticale jumps by one scanline
  • Tunnel Runner (Vsync issues)
  • Dark Chambers: does not initialize the stack pointer properly on startup and dies miserably if the stack subsequently collides with TIA address space --- depends on random seed.
  • Thrust: controls are messed up if all four paddles are active

Safari compat fixes

Safaris indexedDB implementation is known to be badly broken -> fix by selectively enabling a shim in safari.

Storing data in SWCHB

SWCHB can actually be used to store a small amount of data, as illustrated in the following:
http://atariage.com/forums/topic/167678-strange-color-problem-with-stella/page-2#entry2075671

This is already emulated in Stella some time ago. In my testing, only MAME emulates this; z26, javatari and Stellerator don't. I think it's actually used in Combat too, so it's not just an idiosyncrasy of the hardware that nobody uses.

You'll know if it works when you see the display cycling through the contents of ZP RAM, starting from $FF and going downward. When not implemented, the ZP RAM address stays at $FF (which makes sense, as the counter used the ROM is stored in SWCHB).

PCM Audio

The current audio implementation drives the WebAudio synth API. While this is very robust and well adapted to the timing issues present in the web environment, it is not accurate enough for PCM via bitbanging (Quadrun, DPC, ...).

For this, we need an alternate audio endpoint / driver combo that generates and plays PCM frames.

Randomized initial state

Initial state should be initialized with a seeded random number generator, the seed should be part of the config. This currently prevents games from generating random state :)

Software volume control

I don't know how easy/possible this is, but would it be possible to have software volume control in Stellerator. Currently, every time I test a ROM, the windows in the house shake, since the volume is top high ๐Ÿ˜ˆ

Apologies if this is already possible. In that case, please advise on how to use it.

XAYAX Bang!

Remaining issues in xayax bang! demo:

  • Vertical line is cut off

Better phosphor emulation

The new image processing pipeline would allow to run a much more sophisticated emulation of phosphor effects than the current, shader-based hack. Of course, a better shader would be welcome, too ๐Ÿ˜„

grunt initial fails

"src/machine/stella/cartridge/CartridgeFE.ts(110,13): error TS6133: '_cpu' is declared but its value is never read."

It looks like you are preparing for release, so there might be a unexpected change, or the repo isn't ready now. I looked at repo and it looks like you are refactoring.

I followed the instructions and grunt fails on "ts:main" task:

(main) umeboshi@bard:~/workspace/others/6502.ts$ grunt initial
Running "notify_hooks" task

Running "clean:base" (clean) task
>> 2 paths cleaned.

Running "clean:mrproper" (clean) task
>> 1 path cleaned.

Running "copy:install" (copy) task
Copied 4 files

Running "exec:tslint" (exec) task

Running "ts:main" (ts) task
Compiling...
Using tsc v2.6.2
src/machine/stella/cartridge/CartridgeFE.ts(110,13): error TS6133: '_cpu' is declared but its value is never read.

>> 1 non-emit-preventing type warning  
>> Error: tsc return code: 2
Warning: Task "ts:main" failed. Use --force to continue.

Aborted due to warnings.

I am using node v6:

(main) umeboshi@bard:~/workspace/others/6502.ts$ node -v
v6.12.1
(main) umeboshi@bard:~/workspace/others/6502.ts$ npm version
{ '6502.ts': '0.0.0',
  npm: '5.6.0',
  ares: '1.10.1-DEV',
  http_parser: '2.7.0',
  icu: '58.2',
  modules: '48',
  node: '6.12.1',
  openssl: '1.0.2m',
  uv: '1.15.0',
  v8: '5.1.281.109',
  zlib: '1.2.11' }

Since you are refactoring, I decided to test the github.io branch:

(main) umeboshi@bard:~/workspace/others/6502.ts$ git checkout github.io 
Branch github.io set up to track remote branch github.io from origin.
Switched to a new branch 'github.io'
(main) umeboshi@bard:~/workspace/others/6502.ts$ npm install             
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

removed 50 packages in 22.449s
(main) umeboshi@bard:~/workspace/others/6502.ts$ grunt initial
Running "notify_hooks" task

Running "clean:base" (clean) task
>> 0 paths cleaned.

Running "clean:mrproper" (clean) task
>> 0 paths cleaned.

Running "copy:install" (copy) task
Copied 4 files

Running "exec:tslint" (exec) task

Running "ts:main" (ts) task
Compiling...
Using tsc v2.6.2
src/machine/stella/cartridge/CartridgeFE.ts(110,13): error TS6133: '_cpu' is declared but its value is never read.

>> 1 non-emit-preventing type warning  
>> Error: tsc return code: 2
Warning: Task "ts:main" failed. Use --force to continue.

Aborted due to warnings.

Machine events

Provide machine events (register writes, frame start etc.) as breakpoints. Will greatly simplify debugging.

Timer issues

Several timer-related bugs are described on (AtariAge)[http://atariage.com/forums/topic/259633-testing-the-new-stella-tia-core/].

Loading zipped ROMs from the Stellerator window

As you know, we often test ROMs in Stella and Stellerator, and when uploading the ROMs to git, they need to be zipped. Stella already supports loading zipped ROMs; it would be much easier if Stellerator did too.

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.