Commit graph

65 commits

Author SHA1 Message Date
Daniel Prilik
2093dc058d save / load scenes to/from disk
that's it then, the final piece.
You can play games, record scenes, and boot games back up with the
recorded map.

It's not perfect, _far from it_, but it works!

There is still a lot of work to do, improving heuristics and such,
but I think wideNES is at a point where it can be merged into
master and shown off a bit :)

exciting!
2018-07-25 10:31:26 -07:00
Daniel Prilik
fcf791af49 cleanup + make menu a submodule
gui.cc is now _almost_ module agnostic, which is awesome!

The last thing to do is to figure out what's the best way to route
input from the wideNES window to the main window, as the current
solution of _always_ passing input to the emulator is jank af.

I also finally got a ROM loading / unloading solution i'm happy
about. essentially, load/unload have become utility methods on the
shared-state struct.
2018-07-12 18:53:05 -07:00
Daniel Prilik
e0b5ceef39 made ppu_debug into a GUI module + cli toggle wideNES and ppu_debug
no more SDL in ANESE core!

Also, with this commit, I can merge back into master, since wideNES
is hidden behind a flag :)

Before I do that though, a bit of cleanup is in order :)
2018-07-12 17:40:00 -07:00
Daniel Prilik
cba273aa08 automatic padding detection + sampling overhaul
If a human can figure out which parts of a screen to chop, why
can't wideNES do it automatically? Well, it can! sort of...

I implemented a couple of heuristics that use the state of the PPU
and the Mapper to "guess" what padding values make sense.

For now, I only have 2 implemented:

1) Check if the bgr-mask column is enbled on PPUMASK
  - if so, add 8px of padding to the left of the screen
  - many games that mask the left also have artifacting on the
  right, so mask off 8px on the right too.

2) Check what scanline the Mapper IRQs happened on
  - mask-off the rest of the screen
  - many games use the Mapper IRQ for status-bars (smb3, kirby)

Now, these are not perfect heuristics by any means, with exceptions
rampant. eg: Lode Runner doesn't have any graphical artifacting on
the right of the screen. eg2: MegaMan IV uses the IRQ for different
reasons, unrelated to status-bars.

Nevertheless, they do a decent job with many games, smb3 and MC Kids
work flawlessly. Moreover, Metroid and Super Mario Bros work great
too, automatically having the entire screen captured (no padding)

While implemeting this feature, I decided to cleanup how I was
reading the NES's state, and implemented a basic Callback system,
enabling arbitrary methods to hook into important parts of the NES
lifecycle. eg: I added callbacks whenever a mapper fires an IRQ,
and a mapper whenever a PPU frame finished drawing (scanline 240)

This had the happy side-effect of fixing my smearing issues, as it
makes a lot more sense to sample the NES's state _before_ the NMI
handler happens, as that state the one that resulted in the current
frame! Just like that, every game I tested worked flawlessly, no
smearing to be found!

Also, this lays a much more solid groundwork for implementing a
proper debugger! It should be easy to take the nastyness that is
ppu_debug.cc and extract it into it's own GUI module! That way,
there will be _no_ state of SDL in ANESE core!
2018-07-11 16:17:08 -07:00
Daniel Prilik
28233ab5a5 add padding + update READMEs
I still haven't figured out the smearing issue, but I _did_ figure
out how to greatly-improve compatibility with many titles!

I added the ability to "pad" the screen, cutting-off any artifacts
at the edge. This means that with a bit of tweaking, games like
SMB3 and MC Kids work near flawlessly!

It _should_ be possible to guess "good" padding values for games by
using some heuristic that relies on current mirroring mode, scroll
direction, and if the PPUMASK is on...

I also updated the README some more, putting a "teaser" for wideNES
on the main page, but splitting off the details into it's own page.
2018-07-10 18:28:22 -07:00
Daniel Prilik
a2e87f25bb make wideNES a standalone GUI module + smearing fix?
Yeah, it's about time I get wideNES out of the main NES module, it
was starting to make a mess. Instead, wideNES now has it's own
window, with it's own SDL rendering context.

I'd actually like to refactor the emu module some more, possibly
splitting it into sever different ones. eg: emu_core for the main
NES console + frameloop, emu_controls for handling input / movie
support, and take the file i/o and throw that into the menu module.

I'll get around to it eventually :)
Plus, if I can modularize things a bit more, I can merge this
branch into main, and put the entire wideNES module behind a flag!

-----

smearing.

I'm very confused.

I tried a bunch of stuff, and one thing I stumbled on was that if I
use the _last_ frame's scroll values, then I can fix smearing in
some games (smb2, metroid) at the expense of adding it to other
games (smb1)

I'm really not sure why that's happening, but i'll try investigate.

-----

Oh, and I added basic pan/zoom to WideNES, so you can scroll around
the viewport now :D
2018-07-10 14:15:03 -07:00
Daniel Prilik
adb409b196 add Metroid GIF 2018-07-09 18:40:27 -07:00
Daniel Prilik
af0edffe62 updated branch readme 2018-07-06 19:08:55 -07:00
Daniel Prilik
a9d3c8ab47 mention new release 2018-07-04 10:12:40 -07:00
Daniel Prilik
8423bd9a30 cleanup
I'd like to think this commit marks the end of the first phase
of ANESE's development. It's been a long road, but ANESE is
finally at a point where I'm mostly happy with it.

ANESE sure as hell isn't perfect, but hey, it's pretty good!
The core code is pretty clean, the UI code is... acceptable, but
most importantly, ANESE actually plays my favorite NES games!

There is still some work to be done before I'd be comfortable
giving ANESE a v1.0.0 release, but what I have here is still
pretty great.

Let's call this ANESE v0.9.0 :)

-------

So, what next?

Well, contrary to what I said in some earlier commits, I think i'll
continue to work on ANESE a little bit more!
Specifically, i'd like to rewrite the 6502 emulation.

My current implementation is... okay.
It's instruction-level cycle accurate, but I don't think that's
good enough. It really should be sub-instruction level accurate.
Odds are the added accuracy will fix _a lot_ of bugs.

Aside from accuracy though, I have another reason to do a rewrite...

As a Waterloo student, I have to do a Work Term Report on some
technical project i've worked on recently. ANESE is one such project.
Since the report isn't designed to be very long, I'd limit my scope
to just a small aspect of ANESE: the 6502 emulator.

Yes, I could just write the report on how I arrived at my current
implementation, but I think it would be cool to attempt a cleaner
rewrite, and compare and contrast the two versions.

So yeah, stay tuned! I might also post the writeup (once I get
around to it)
2018-07-03 22:42:18 -07:00
Daniel Prilik
d3c70fff37 improved parameter passing into ANESE core
no more janky DEBUG_VARS! Now, there is a defined NES_Params object
that is passed (by const ref) to the NES on construction, which is
passed along to all components that need it, with each component
holding a const ref to the individual fields it cares about.

Plus, I could finally get rid of debug.h/cc, which has outlived
it's usefulness.
2018-06-29 18:07:27 -07:00
Daniel Prilik
245a8b4d97 basic persistent config
cross-platform support man. it's tricky.

I didn't want to include more libraries, but I really didn't want to
deal with cross-platform pathfinding, or coming up with a custom
config format.

I still had to slap together a janky solution for getting a folder's
absolute path across platforms, but it seems to get the job done...
2018-06-29 12:20:59 -07:00
Daniel Prilik
f680a40348 dmc fixes + apu cleanup
I fixed up the dmc some more, since I realized it sounded like
death (especially in Kirby's Adventure)

I also refactored and cleaned-up much of the APU. Lookin' good :)
2018-06-28 12:19:45 -07:00
Daniel Prilik
c905276b95 update README, done first pass at APU!
Well, here we are. I implemented my own APU.

It's not great, far from it. Hell, I doubt interupts even remotely
work. I sure as hell won't be passing any APU tests...

But hey, it works in most games!

---

This was my last major task with ANESE.

While there are a _lot_ of things that I could still improve, I
think it might be time for me to ramp down, and start looking at
some other projects to work on. ANESE has taken up a huge chunk of
my time lately...

In the near future, I might push a few more commits to ANESE,
cleaning up some code here, adding some more comments there. Maybe
i'll actually improve the UI a bit.
2018-06-27 18:59:09 -07:00
Daniel Prilik
f65b943078 replace heavyweight args with single-header clara
oh, and fixed a bug where I didn't clear save-states across game
loads / saves.
2018-06-19 18:58:48 -07:00
Daniel Prilik
9400333797 massive mapper cleanup
I pushed a lot of common behavior up to the Mapper base class,
the most substantial of which is the bank-chunking logic.

Doing so did lead me to yak-shave a bit, since I needed to add
proper inheritence support to the Serialization library. It's not
_completely_ transparent, but it's pretty good. Essentially, since
C++ doesn't have a built-in "super" keyword to access the parent
class, you have to manually specify the parent class.
I didn't implement multiple-inheritence support though, since that
isn't relevant to me right now.
That said, the serialization library is really nifty, so (like I
mentioned earlier) i'd like to spin it off into it's own repo.

I also took this chance to add power_cycle() and reset() methods to
the mapper interface, since I realized that some games would die
on reset due to registers not being cleared properly.

So yeah, feels gud man.
2018-06-15 17:50:45 -07:00
Daniel Prilik
e99b7d13c3 added a SDL filepicking UI
tinyfiledialogs was a good band-aid, but it was always kind-of a
janky solution. Mind-you, this file-browser I threw together ain't
the nicest either, but at least it's within the main SDL window.

Now that the menu is in place, it's possible to switch between
games without restarting! Also, opening the file-picker pauses
ANESE, so that's good to finally have.

Thanks a bunch to cute_headers for a neat little cross-platform
directory traversal library, and also SDL_inprint for a quick-and-
dirty embedded font for use in the menu. Not having to bring-in
SDL_ttf is a huge load off my shoulders.

Oh, and i've noticed that `gui.cc` has started to get bloated, so
now I need to get around to cleaning it up weeeeee.
2018-06-11 18:36:48 -07:00
Daniel Prilik
c9b735bf36 finished initial clenaup of SDL2 frontend
It wasn't that hard to do per-se, it's more about me finally
getting around to doing it. main.cc is hella clean, just making a
new SDL_GUI instance, and letting it RAII all of the SDL stuff.

Also, now that the new project directory structure is in place, it
shouldn't be that hard to add a LibRetro core! Fun!
2018-06-08 18:16:03 -07:00
Daniel Prilik
653cb24e49 upload macOS bundles to GDrive 2018-06-08 10:47:29 -07:00
Daniel Prilik
6751d7948d correct sprite fetch timings - MMC2 works now!
It's not the prettiest code, and it sure as hell isn't how the
hardware does it, but by lord it does what I need it to do!
Yep, I pretty much copied the existing sprite fetching code from
one part of my PPU, and slapped it in spr_fetch(), with
cycle-accurate timings.

This is awesome, since I can remove the ugly "passing the PPU to
the mapper" shenanigans I wrote to get it working. I can actaully
use the correct MMC3 timing behavior, i.e: watching PPU A12 for
a rising edge.
Plus, if I switch to a subcycle-accurate CPU emulator, it _should_
automagically fix flickering in Kirby's Dreamland!

Oh, i'm almost forgetting the most important bit: Punch Out!!
It works now!!

That was the last game I really cared about getting up and running,
which means that I'm not going to be focussing on mappers for the
next little while, shifting gears instead towards accuracy stuff.

Basically, there are 2 things that I really want to get around to:
1) subinstruction cycle-accuracy - i.e: rewrite the CPU
2) write my own APU implementation

Of these two, I think i'll tackle 2) first, because if I don't do
it, i'll never be fully satisfied with myself. How can I say I
wrote a NES emulator if I haven't even written a major chunk of it!

So yeah, good stuff!
2018-06-07 18:39:22 -07:00
Daniel Prilik
deeebe75ac minor README tweaks 2018-06-05 16:50:53 -07:00
Daniel Prilik
60836bd54c added macOS bundle creation to make install
It's kinda jank, but hey, it works?
The serious issue is that it relies on the SDL2 dylib installed
from homebrew, and if that verion ever gets bumped, RIP.
2018-06-05 15:44:15 -07:00
Daniel Prilik
7ef2416115 updated README, and removed Ubuntu build from appveyor
hey, look at that. I have CI now :D

One of these days i'll look into how to package up macOS builds,
and update my cmake scripts to prevent a console from popping up
on windows.
2018-06-05 11:34:42 -07:00
Daniel Prilik
2aa17b3c97 add appveyor CI 2018-06-05 11:05:30 -07:00
Daniel Prilik
d7a2f07644 Save States Work!
This serialization framework sure was something!

It is by far the jankiest, ugliest, nastiest C++ i've written,
using a bunch of dirty pointer-hackery and casting to make it work
as "seamlessly" as it does, but god-damn if the end result isn't
marvelous.

Serializing arbitary C++ classes is hella simple now! Just extend
it as "Serializable" and slap-on the appropriate field definitions.

Now, there are a couple rough edges...

First of all, I don't handle Serialization inheritence that well.
Well... at all.

Only data serialized by the last-class in an inheritence chain gets
serialized, which works well-enough for Mapper extending
Serializable (since it doesn't actually have any data to save at
the base level), but things might break down the line.

Since this serialization library is pretty neat on its own, I
think I might spin-it-off into it's own project :)
2018-05-31 19:10:44 -07:00
Daniel Prilik
e7257234bd taking a stab at saving - battery-backed RAM works!
Try and run Zelda, it should generate a .sav once ANESE closes, and
it should automatically read it once ANESE is reloaded with the same
file :)

So yeah, serialization.
It's an important part of any emulator.
It makes saving unsavable games possible.
It opens the door to a whole mess of neat stuff (rewind OwO)
The question becomes, what's a good way of doing it?

While there are probably much better solutions out there, I want my
solution to be fairly simple and lightweight.

The gist of the system is that anything that can be serialized will
extend the Serializable class. Though some clever use of
inheritance and macros, serializing the state of an object will be
as straigtforward as defining which fields should be serialized
(in the constructor, using some macros), and then calling
serialize() and deserialize(data) appropriately :D

I'm not planning on doing anything too fancy, basically just some
structured memcpy's, but it aughta work okay. Hell, i'm not even
labelling chunks, so if I ever change the order in which something
serializes it's members, old saves won't work anymore haha.
At least it's portable... ish? I've been using sizeof with fixed-
width types, so saves _should_ transfer across machines.
(assuming they have the same endianess)

Oh, and I still haven't figured out how i'm going to handle
serializing data-structures that have serializable members, (which
is kind-of important when serializing the NES / some of the fancier
mappers)

Off the top of my head, it might make sense to adopt some sort of
tree-like approach... but idk yet.
2018-05-30 17:16:00 -07:00
Daniel Prilik
a5477dace3 quickfix for paperboy + README update 2018-05-29 17:03:38 -07:00
Daniel Prilik
4751db118d mapper cleanup and major reorg - part II
I shuffled A LOT of files and functions around.

Two big things in this change:

1) There is no more Cartridge class.

I wrote that class when I was just starting out with ANESE, and
before I had a good idea of how NES hardware operates. As it turned
out, the Cartridge class essentially just mirrored the Mapepr
interface! The only real functionality it brought to the table was
routing the raw ROM data through into thte ROM_File class, which
would parse the ROM data.

I restructured all that.

File parsing shouldn't be under the /nes directory, since the nes
couldn't care less if the ROM file is iNES, NES2.0, or whatever
other formats there are. All the NES cares bout is that there is a
ROM_File struct with good data in it.
So, I moved the specifics of file-format parsing out of /nes, and
put them under /ui/fs/parse_rom.h.

I've changed all the interfaces that used Cartridge to just use
Mapper, and pushed the construction and ownership of the ROM_File
struct to main() for now. Which leads to number 2...

2) Main doesn't have any filesystem code anymore.

Yep, i've moved all the code required to read roms (and general
files) into /ui/fs/load_rom.h, so all main() has to do is pass the
path to a ROM / file, and it gets back a fully validated ROM_File
struct, or filled data pointers!

The code could still use some work, reorganizing the freestanding
functions into classes / namespaces, but this is a big step-up
from just having it all cluttering up main()

----

So yeah. Not much on the emulation front today, mostly just
improving code-quality.

(i'm also just procrastinating having to implement MMC3 lol)
2018-05-22 17:45:08 -07:00
Daniel Prilik
5e2ade82b9 mapper cleanup and reorg - part I
i've also had a chance to experiment a bit with ANESE, and I've
realized that I probably won't get supreme cycle-accuracy working.

My CPU emulator is instruction-level cycle accurate, but there are
some tests, games, and demos out there that rely on sub-instruction
level timings.

fixing these issues would involve a substantial rewrite of the CPU
core, which is something that I doubt i'll get around to. I'd
rather just push forward with implementing some more mappers,
cleaning up the code and UI, and taking a stab at a proper
home-grown APU implementation.
2018-05-22 15:42:07 -07:00
Daniel Prilik
33c174c9fe added rudimentary fm2 movie playback
It's one of those little featues that is nice to have. I'll record
myself playing some games, and i'll be able to see how various
changes I make alter the timings.

also, maybe i'll get to the point where I can actually run propper
TAS movies on ANESE. that'd be pretty rad.

----

I also moved speedup out from the nes core, since movies would need
a lot more fancy logic if I had kept the functionality contained in
nes.cc. The only reason the nes is still notified of the speed
change is so Blaarg's APU can adjust itself.
2018-05-21 18:51:53 -07:00
Daniel Prilik
41a5ae8cb6 more granular speed-adjust, some cleanup in main.cc and CMakeLists
I'm just procrastinating debugging the PPU.
2018-05-16 13:19:07 -07:00
Daniel Prilik
0eb82ac726 implemented mappers 2 and 3, started on 4
so, MMC3 == Mapper 4. that kind of tripped me up a bit, but that's
a minor thing

So yeah, MMC3 is a tricky boi, and it's probably going to require
some restructuring / new wiring. I'll tackle that later.

In the meantime, I got mappers 2 and 3 working! They are really
simple mappers: 2 has a single swappable PRG ROM, and 3 has a
single swappable CHR ROM. ezpz implementations.
Mappers 2 and 3 got some quality games "working," such as Mega
Man 1, Contra, and Arkanoid! "working" is in quotes because i'm
still seeing glitchy graphics, namely in Contra.

By the looks of it, the glitchy graphics are similar to those in
some MMC1 games i've messed abou with, which indicates to me that
odds are the root of the problem lies somewhere with my PPU
implementation.

My gut is telling me it might be something to do with DMA timings,
but that may very well be completely wrong...

All in all, i'm pretty happy with this commit. I can stop stressing
over my MMC1 implementation, and instead get _really_ stressed over
my PPU implementaion!

weeeeeeeeee
2018-05-15 17:59:36 -07:00
Daniel Prilik
92d14e0486 hammering on MMC1, trying to get Zelda working
It's been a while...

Once the semester started, I stopped working on my sideprojects,
as I had built a brand spanking new Gaming PC, and PUBG entered my
life.

Well, it's coop now, and I don't have a fancy gaming PC.
Might as well finish what I started here.

I always felt bad that ANESE was broken, and couldn't play all the
major titles. Yeah, SMB1 and Donkey Kong are great, but what about
Zelda? What about SMB2 and SMB3? Kirby?

So yeah. Hopefully I can get those working, and go on to bigger and
better things!

-----

Now, I don't know for sure, but I _think_ i've mostly fixed my MMC1
implementation. It passes the MMC1 mapper tests.

That means that things are broken for other reasons...
...
...

the PPU probably.

Ugh, this is going to suck.
2018-05-11 15:46:48 -07:00
Daniel Prilik
cfe1d2b94d Mapper 1 Support
So, lots of early assumptions proved to be wrong.
This meant that there was a bunch of code that had to be rewritten.

1) iNES format stores ROMs in 16k / 8k chunks, but that does _not_
   mean that all mappers bank along those lines!

I rewrote the entire ROM File parsing logic, and instead of chunking
the raw ROM into banks at the iNES parsing stage, it is done on a
mapper-per-mapper basis

2) Cartridges are _not_ just dumb data storage devices, and can have
   cycle-dependant logic!

To be fair, I knew I would have to cross this bridge someday. I had
to expand the Cartridge / Mapper interfaces to expose more of the
NES's. This is in both directions: Giving the Cartridge acess to the
NES's cycling logic, and also giving the NES a direct way to get
mirror modes from the cartridge (dynamically)

I was hoping that getting Mapper 1 working would also get Zelda
working, but alas, it's crasahing for some reason! As usual, I
suspect it's some shitty timings, and I can confirm, I am failing
a bunch of the NMI timing tests...

I _really_ don't want to go back into the hellhole that is the PPU,
but gosh darnit, I wanna play Zelda!

But hey, at least Megaman II works now :D

PS: I've been working on this commit for probably, oh, 8h total?
Not all at once mind you, it's been over the span of several days.
Now that i'm back in Toronto, i've been a bit busy, what with the
holidays, and old friends, and Wolfenstein II / DOOM taking up my
time.
2017-12-27 16:34:48 -05:00
Daniel Prilik
edb40e42e7 APU courtesy of Blargg's 💯 nes_snd_emu library
I started looking into how to make the APU, and boy, let me tell
ya, it's going to be a massive undertaking.

Undoubtedly a fun undertaking, but still...

Since it's a personal goal to get Super Mario Bros 2 running
before new years (after all, that game has won
game-of-the-year i don't even know _how_ many years in a row),
i've decided to just use Blargg's venerable `nes_snd_emu` library
for now.

It took some wrestling, it it's in, and it works!

Almost.

I still don't know why enabling the Frame IRQ kills most games, but
i'll look into that!

Welp, on to bigger and better things!
Namely: MMC1, which will give me Zelda and... Super Mario Bros 2!
2017-12-20 00:00:56 -05:00
Daniel Prilik
c0e9556e1d add support for zipped roms
golly, i sure do hate cmake.
why does c++ package management have to be so bloody hard?
2017-12-18 22:26:56 -05:00
Daniel Prilik
0538ae0517 add fast-forward mode 2017-12-18 13:52:36 -08:00
Daniel Prilik
8c8177dc29 sprite 0 hit - MARIO WORKS HOLY SHIT
HOLY SHIT THE DAY THAT I'VE BEEN WORKING TOWARDS FINALLY CAME!

SUPAH.
MAHRIO.
BROS.
1.
WORKS!

Now, mind you, it's not flawless.

There are some issues I still need to work out, but nevertheless,
IT BLOODY RUNS!

I have a suspicion that it's relying on more accurate timings,
since right now, movement is pretty jank, and the time is ticking
far too quickly...

I'll look into the Frame IRQ now, hopefully that will be the last
piece of the puzzle :)

...

I'M SO HAPPY!

...

PS: I'm writing this from a plane as I fly home from vancouver.
It's pretty rad that I got this working on a plane :D
2017-12-17 13:40:41 -08:00
Daniel Prilik
baa01f12e9 BACKGROUND RENDERING PROPERLY! DONKEY KONG WORKS!
It happened! IT FINALLY HAPPENED!
I reimplemented how background pixels are rendered, and by golly,
IT SEEMS TO WORK! And you know what that means... DONKEY KONG
FUCKING WORKS. YES!

This is a _huge_ win for me, and i'm super stoked.

Up next, i'm going to look into redoing sprite rendering properly,
and getting the sprite-0 hit working. Hopefully, that will get SMB1
booting (unless it also needs the Frame IRQ implemented...)

WOOT!
2017-12-16 20:20:22 -08:00
Daniel Prilik
14d278e5d2 ui and build improvements
added some 3rd party libs today! man, cmake is pretty complicated,
so it took a while to figure out, but hey, it seems to be working,
so that's good!

I added two libraries:
- `tinyfiledialogs` to handle opening a file-select window (that
  varies per platform) in the case that no rom is specified on the
  commandline.
- `args` handles parsing and validation of commandline arguments.
  As I start to add more and more flags, it's probably a good idea
  to set up a more extensible framework to configure ANESE

Oh, and FYI, this is all me procrastinating working on the PPU.

weeeeeeee!! isn't emulation fun?!
2017-12-14 16:17:51 -08:00
Daniel Prilik
61f45d68f6 rudimentary controller support (neat!) 2017-12-13 17:57:23 -08:00
Daniel Prilik
c47461cdc0 add logo + windows exe icon 2017-12-13 13:58:39 -08:00
Daniel Prilik
8b7c5f525e switch msvc to use Release config
yeah, i'm a bit of a dummy. I was building ANESE in _Debug_ config
with MSVC, and wondering why it was so bloody slow. Well, no shit
it's slow, it's not even being optimized!

I've set all the flags properly now, and have killed the windows
clang portion of the cmake script. Clang is a massive pain in the
ass to set up on windows with visual studio, so finally getting
MSVC to run ANESE properly is awesome.
2017-12-13 11:35:56 -08:00
Daniel Prilik
283ecf7fb6 slightly better shortcuts 2017-12-10 13:34:53 -08:00
Daniel Prilik
d7c60781b2 implement joypad interface + standard controller
basically i'm just procrastinating, since getting the PPU working is
a _real_ grind
2017-12-10 13:17:32 -08:00
Daniel Prilik
145a46914a add clang build to windows
At this point in development, MSVC is not generating optimized
code for ANESE, and struggles to hit 60 fups.

Clang makes beautifully performant builds though :D
2017-12-04 09:49:35 -08:00
Daniel Prilik
2918634125 shuffle code around for readability 2017-12-03 14:29:42 -08:00
Daniel Prilik
e1da1e65d3 work on sprite rendering
this isn't going well.

i've decided to forget accuracy for the moment, and to focus on
just getting the damn thing working with simple stuff, like the
Zelda title-screen demo, or Donkey Kong.

But fuck me man, this shit is complicated.

I'm going to bed now, and hopefully, next time I work on this,
i'll be able to get sprite rendering working properly.

hell, maybe i'll just scrap that, and instead focus on rendering
the background properly. I have a feeling that's going to be
a bit easier...

Right now, I really want to give up, and call it quits on this
project, because holy crap am I getting annoyed.
But then I remember that one day soon, everything is going to
work, and all this effort will have been worth it.

I hope that day comes soon.
2017-11-20 01:26:31 -08:00
Daniel Prilik
7d722d9132 fix g++ and MSVC warnings + do some cppcheck linting 2017-10-31 17:03:23 -07:00
Daniel Prilik
344bbb083e overload operator[] for Memory interface 2017-10-30 18:36:28 -07:00