Code Monkey home page Code Monkey logo

laines's People

Contributors

andreaorru avatar kraln avatar pudgema avatar tyfkda 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  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

laines's Issues

Save settings

Pretty tired of having to reconfigure the joystick every time I open this :)

Debug assertion "Frame went past end of buffer"

Is this a known issue?

../lib/include/Blip_Buffer.h:230: void Blip_Buffer::end_frame(blip_time_t): Assertion `( "Blip_Buffer::end_frame(): Frame went past end of buffer", samples_avail() <= (long) buffer_size_ )' failed.

It happens here:

#4  0x00007fffed56903d in Blip_Buffer::end_frame (this=0x7fffed5ce0c0 <APU::buf>, t=29783) at ../lib/include/Blip_Buffer.h:229
#5  0x00007fffed568e31 in APU::run_frame (elapsed=29783) at ../src/apu.cpp:45
#6  0x00007fffed55da7d in CPU::run_frame () at ../src/cpu.cpp:273

For context, I was working on a libretro port of your emulator core, but I do not think that is the issue here. The frame count is always at 38 when this crash happens. I'm testing with SMB1 (World).

Branches to a new page

Hi,
maybe I'm wrong (if so, sorry for that), but I can't find the two extra circles, if a branch goes to a new ram page. (see: http://obelisk.me.uk/6502/reference.html#BCC )

should this:
template<Flag f, bool v> void br() { s8 j = rd(imm()); if (P[f] == v) { T; PC += j; } }

be maybe something like this:
template<Flag f, bool v> void br() { s8 j = rd(imm()); if (P[f] == v) { T; if(cross(PC, j)) {T;T;} PC += j; } }

Thank you

File explorer not showing all files.

Steps to reproduce:

Build OS X version
open lines and open a directory with 40+ rom files
try going to the last one.

Result: while it does select the rom, it won't show it on screen so you have no idea which rom you picked.

Debugger

It would be quite nice (especially for development of the emulator, but also for development of homebrew and/or examining commercial games) for some amount of debugging capability. I could imagine, variously:

  • ROM Header Viewer
  • CPU State Viewer
  • PPU State Viewer
  • Tilemap RAM Viewer
  • Palette Viewer

Etc. ( example: http://www.fceux.com/web/assets/debugging_environment_1900px.png )

I don't know if this aligns with the goals of the project or not.

Fast Execution

Is it possible to modify this code to remove all frame limiting mechanisms? For instance, if I wanted to adapt this library to allow a machine learning algorithm to process game data at something close to 1000 frames per second (rough number), would that be doable?

Removing the frame limiting mechanism in the run function of the GUI appears to provide some speedup, but are there other modifications to potentially boost this further?

An online game?

I'm going to change it into a two-player-online-game.Could you give me some advice?

Build issues

Hello,
I didn't manage to build the project on Ubuntu
More precisely, "scons" provokes 404 errors
image
Any idea how to fix?
Can you please provide a build executable for people who have the same issue?
Thanks!

Set Upscaling filter to 'nearest' for crisp pixel art

Hey, I recently stumbled across your project because I am currently fiddling around with emulators myself and got to say, that I really like your simple, clean interface :) Just wanted to recommend setting the SDL_HINT_RENDER_SCALE_QUALITY hint to 'nearest' instead of 'linear' which (on my opinion) looks way better when upscaling the window.

libretro support

This has been proposed on /r/emulation and Hacker News. I think there would be a lot of value in it. Prioritize.

Building on OSX with brew requires some extra flags

Building on OSX for me needed some extra flags in the SConstruct.

Error:

>  scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
clang++ -o src/Sound_Queue.o -c -O3 -march=native -std=c++11 -Wno-unused-value -Isrc src/Sound_Queue.cpp
In file included from src/Sound_Queue.cpp:4:
src/Sound_Queue.h:9:10: fatal error: 'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
         ^
1 error generated.
scons: *** [src/Sound_Queue.o] Error 1
scons: building terminated because of errors.

I get a successful build with:

diff --git a/SConstruct b/SConstruct
index d9b6582..e95887f 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,6 +1,6 @@
 from os import environ
 
-flags = ['-O3', '-march=native', '-std=c++11']
+flags = ['-O3', '-march=native', '-std=c++11', '-I/usr/local/include', '-L/usr/local/lib']
 
 env = Environment(ENV       = environ,
                   CXX       = 'clang++',

But it also has a bunch of build spam like:

clang: warning: argument unused during compilation: '-L/usr/local/lib'

for every unit that doesn't need SDL. I'm an ignoramus when it comes to scons so posting an issue vs a pull request in the hope someone else knows how to resolve that trivially.

Rewrite APU

This is an absolute priority in order to remove the dependency from boost and Blargg's stuff.

Save games.

Battery-backed RAM should be saved in a file. This is pretty important.

UWP port

Hi!
Nice project. "1000 lines of code" is really hacker-style :))
Please remake it into UWP app for Win11/XBox Compatibilty ;)

Buffer overflow

Hi, there appears to be a global buffer overflow caused by line 187 here:

LaiNES/src/ppu.cpp

Lines 181 to 187 in 52b7920

secOam[n].id = i;
secOam[n].y = oamMem[i*4 + 0];
secOam[n].tile = oamMem[i*4 + 1];
secOam[n].attr = oamMem[i*4 + 2];
secOam[n].x = oamMem[i*4 + 3];
if (++n > 8)

Because n is allowed to be 8, the next loop iteration where n == 8 overflows the secOam buffer because it can only hold 8 elements.

cycle number of Instructions

I find cycles of instruction don't match the information is list here.
for example:

ADC<imm>() :
inline u8  rd(u16 a)            { T; return access<0>(a);      }
#define G  u16 a = m(); u8 p = rd(a) 
inline u16 imm()   { return PC++;                                       }
template<Mode m> void ADC() { G       ; s16 r = A + p + P[C]; upd_cv(A, p, r); upd_nz(A = r); }

it only ticks once, but in that link this ins need two cycles

 +----------------+-----------------------+---------+---------+----------+
  | Addressing Mode| Assembly Language Form| OP CODE |No. Bytes|No. Cycles|
  +----------------+-----------------------+---------+---------+----------+
  |  Immediate     |   ADC #Oper           |    69   |    2    |    2     |

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.