GithubHelp home page GithubHelp logo

halfnes's People

Contributors

andrew-hoffman avatar bryant1410 avatar gitter-badger avatar klaushauschild1984 avatar magneticflux- avatar metteo 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

halfnes's Issues

Native files never deleted on Windows 7

I just realized I have like 200 copies of jinput-dx8.dll in my Temp folder, all in folders named things like halfNES-natives2281448322177416404. When the natives are created the files and the folder are set to be deleted on exit by calling (file handle).deleteOnExit(); but it doesn't seem to happen. It's not that big of a deal since each set of natives is only 64k but that could still add up over time.

I tried redesigning the Quit methods to eliminate the call to System.exit(0) and did make some things more consistent in the process, like I didn't realize that window position was only saved when you used the Quit command from the menu, but the temp files are still not deleted when I don't use System.exit at all.

Doesn't matter whether I run it inside or outside the IDE.

Need to check if this works on other platforms.

Scrolling so jerking on non-NTSC systems

Scrolling so jerking on PAL and Dendy/Hybrid systems even if "Sleep Between Frames" is ON.
Other emulators does it more smoother (even at 60Hz physical display refresh rate).

Usage as library

I want to use halfnes as library.
Currently it is a stand-alone app only. What I need is embedding the emulation as library, remote control the input and grap all the output data (screen, sound, etc). Of course the hole emulation should run headless.

If you want this but not familiar with this kind of task I can contribute.

Freeze caused by waiting forever for audio buffer write

My laptop has an occasional issue where the sound device stops working completely, This affects various programs differently. Most browsers will still play video without the sound, Winamp won't start playback at all. I can fix that by disabling and re-enabling it in the Device Manager but it exposes a bug in my own software that I thought I'd mention here.

With HalfNES, with the sound disabled in Preferences things work normally. But if I turn on the sound everything freezes. The reason for this is that the SourceDataLine doesn't throw any exceptions when creating it with the system in this state but when I actually try to write to the buffer it blocks forever in a wait() loop.

Now I currently depend on the audio buffer blocking at least a little bit to maintain synchronization but I can't tell if its just going to block for a little bit or if no data is being drained from the buffer at all as far as I can tell.

Having an extra sentinel thread to interrupt the waiting if it's taking far too long doesn't work because of this lovely bit of code in the Swing mixer:
https://community.oracle.com/thread/2381571

I think to fix this will require changing to a different audio system, or rewriting my code to never attempt to block on the audio buffer at all. That will require outputting much finer grained chunks of audio, maybe a line worth rather than a frame worth (a good idea anyway) and finding some other more accurate source of 60/ 50 hz timing. I can't get anything like a vblank interrupt from Swing but JavaFX does have an animation timer that might work.

Unitests NEEDED

There are no unit tests or something that ensures the correct functionality.

Some unit test would be nice.
Another aproach are integration tests with the various test-roms out there.

Will not build

There is an issue with the current revision, it does not build or run without modification.

There are unstated deps taken on libs, these need to be found and added. There is also broken code around controller detection.

Disable audio, bug

When to disable audio, the timing of emulator if too fast. Speed of frame don't 60 or 50 HZ when to disable audio.

Add light gun support

Things I need for this:

  • ability to get location of a click on the game window
  • select a more appropriate mouse cursor
  • need to map location of click to brightness of pixel being drawn in CURRENT frame (not the last frame that's actually being shown at the time)
  • UI for changing connected controllers (might add better gamepad rearrangement too)
  • Famicom and NES lightgun differences?

Add these mappers

028, 118, 158, 095, 080, 207
basically all the boards that use CHR address lines for mirroring control

HD tile replacement and xBRZ

about transplant..

Hello God, I've transplanted your project to android,but it runs very slowly every frame takes 80 milliseconds.
It can be full frame running on PC
Is the Java jvm on the mobile phone system so much worse than the PC?

Check functionality on Mac OS El Capitan

someone commented that the .app file I've built doesn't work any more (it was a Japanese OS) but I don't have a Mac that can even run Yosemite. Need to check this in the graphic design comp. lab or something.

Remove JavaFX dependency

I am getting this error when compiling with maven:
/halfnes/src/main/java/com/grapeshot/halfnes/ui/OnScreenMenu.java:[54,48] package javafx.scene.input does not exist

Would it be possible to Port the emulator to another GUI? Or maybe to create an abstract GUI with different implementations for different GUIs.

Add FDS support

I already have the sound chip emulated, so I should do the rest.

Needed:

  • Interface to locate FDS BIOS ROM
  • Interface for flipping disk
  • Mapper that can have two ROM files loaded @ once
  • disk read and write routines that interface with BIOS
  • FDS header parser
  • Need to regenerate timing info and padding between files that should be stored in disk images, but isn't
  • Should save games be written back to the disk file or to a separate .sav?

Get a better UI

Specifically one that doesn't drop down to 20 fps just for upscaling your image too far with bilinear. Probably LWJGL or SDL, but I need to figure out how to do a menu bar. It would be ideal if I could compile and run shaders.

add PAL and Dendy mode

Hi, Andrew.

Can you add PAL and Dendy (NTSC/PAL Hybrid) modes to halfnes please?

"Dendy-mode" is name for pirate PAL timing, which allow to run most of NTSC games (Jap, USA) on 50 Hz without glitches, with correct DPCM sound pitch also, unlike official PAL NES timing.
No need to "autodetect" it via "auto-region". It must be set by user, and emulator should "remember" it.

Complete Information:
Cycle Reference Chart - nesdev wiki
Table of differences between NTSC, official PAL NES and Dendy pirate PAL timings
Global Nesdev F.A.Q.

Dendy timings have specific behavior, causing some in-game glitches, so here is ROMs to-test it:
240pee by Tepples (Damian Yerrick) must show timing:
240pee_timing

Battletoads and Double Dragon (U).nes
Must have glitches like this:
BTDD_Dendy

"Choujin Sentai - Jetman (J)" intro glitch:
Jetman_Dendy

Noise and DMC APU pitch tables are same as NTSC NES/Famicom,
so Sunsoft NTSC games must have correct pitch

P.S:
"Dendy-mode" is only euphonic name. A thousands of "NTSC/PAL hybrid" famiclones work on this timings.
They have different labels/names in CIS countries ("Dendy", "Lifa", "Kenga", "Subor", etc),
Eastern Europe (i know "Pegasus" in Poland) and Asian region ("MicroGenius" in Taiwan).


Thank you for support.

Broken Codemasters games

Completely broken:

  • Fire Hawk (freezes after intro)
  • Big Nose Freaks Out (instead of splitting the scroll it overwrites the tile set and I don't know why)

Not really playable:

  • Bee 52 (glitchy status bar split)

Cosmetic issues:

  • Fantastic Adventures of Dizzy (shaking status bar)
  • Micro Machines (still a flickering line on title screen after latest changes)

Many of these games depend on reading $2004 during rendering to synchronize.
(Micro Machines, Dizzy the Adventurer, Bee 52, big nose freaks out)

Support non-native refresh rates and exact AV sync

Should be able to provide a less jerky picture when the console is not running at the same refresh rate as the computer display, and blend frames instead of dropping them altogether.

Example Scenarios:

60 hz console on 50 fps display like most new Intel IGP laptops do on battery
50hz PAL console on 59.94 hz display
144 hz display (I don't know anyone with one of these yet)

-need to actually be able to detect frame rate of host PC! (and I can't even catch vblank with Swing)
-Nestopia automatically blends frames when they don't match. need fast frame blending (maybe CRT phosphor exponential decay emulation)
-APU sample rate will have to drift a bit so we get exactly lined up with vblank and no dropped frames or sound pops (can adjust output sample rate +/- 0.6% and no one should notice.)

Battletoads and Double Dragon - The Ultimate Team (U) hangs

Battletoads and Double Dragon - The Ultimate Team (U).nes


CRC32: 53B02F3D
MD5: 35933222CF8658F7C6679FC7DE630AAA
SHA-1: 61832D0F955CFF169FF059BD557BE4F522B15B7C


hangs on pseudo-3D levels (1,6,7) when RAW 7-bit PCM samples play (beat enemy or pause drum)
and lifebar also shakes on level 2 for the same reasons.
halfnes

MMC5 problems

  • Bandit Kings of Ancient China does not redraw its map properly
  • Vertical splitscreen does not work
  • Laser Invasion uses wrong color on filled nametables
  • Metal Slader Glory is all kinds of messed up
  • Just Breed crashes if left on title screen for 13s but otherwise works normally

Controller issues

I'm fairly certain this is a linux issue, but while it detects my controller, I can't set any buttons. I've set my controller to both xinput and directinput mode, but the set buttons... er button is still grayed out.

Deadlock when switching to fullscreen

System: Ubuntu 16.04.3 LTS
Java: OpenJDK 1.8.0_151

Relevant part of the thread dump:

Found one Java-level deadlock:
=============================
"AWT-EventQueue-0":
  waiting to lock monitor 0x00007fc258004068 (object 0x0000000771904010, a com.grapeshot.halfnes.ui.SwingUI),
  which is held by "main"
"main":
  waiting to lock monitor 0x00007fc258003fb8 (object 0x00000006c6e01f30, a java.awt.Component$AWTTreeLock),
  which is held by "AWT-EventQueue-0"

Java stack information for the threads listed above:
===================================================
"AWT-EventQueue-0":
	at java.awt.Component.addComponentListener(Component.java:5227)
	- waiting to lock <0x0000000771904010> (a com.grapeshot.halfnes.ui.SwingUI)
	at sun.awt.im.InputContext.addClientWindowListeners(InputContext.java:980)
	- locked <0x000000076d4d3ff8> (a sun.awt.im.InputMethodContext)
	at sun.awt.im.InputContext.activateInputMethod(InputContext.java:407)
	at sun.awt.im.InputContext.focusGained(InputContext.java:338)
	- locked <0x000000076d4d3ff8> (a sun.awt.im.InputMethodContext)
	- locked <0x00000006c6e01f30> (a java.awt.Component$AWTTreeLock)
	at sun.awt.im.InputContext.dispatchEvent(InputContext.java:245)
	at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:196)
	at java.awt.Component.dispatchEventImpl(Component.java:4821)
        (...)


"main":
	at java.awt.Component.resize(Component.java:2183)
	- waiting to lock <0x00000006c6e01f30> (a java.awt.Component$AWTTreeLock)
	at java.awt.Component.setSize(Component.java:2173)
	at com.grapeshot.halfnes.ui.SwingUI.render(SwingUI.java:441)
	- locked <0x0000000771904010> (a com.grapeshot.halfnes.ui.SwingUI)
	at com.grapeshot.halfnes.ui.SwingUI.setFrame(SwingUI.java:424)
	- locked <0x0000000771904010> (a com.grapeshot.halfnes.ui.SwingUI)
	at com.grapeshot.halfnes.PPU.renderFrame(PPU.java:829)
	at com.grapeshot.halfnes.NES.runframe(NES.java:98)
	- locked <0x0000000771899348> (a com.grapeshot.halfnes.NES)
	at com.grapeshot.halfnes.NES.run(NES.java:60)
	at com.grapeshot.halfnes.ui.SwingUI.<init>(SwingUI.java:59)
	at com.grapeshot.halfnes.halfNES.main(halfNES.java:23)

I think it's caused by this line: SwingUI.java:441

It should be called from the Event Dispatch Thread.

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.