2010-08-09 13:33:44 +00:00
|
|
|
class PPU : public Processor, public PPUcounter, public MMIO {
|
2010-08-09 13:28:56 +00:00
|
|
|
public:
|
Updated to v067r21 release.
byuu says:
This moves toward a profile-selection mode. Right now, it is incomplete.
There are three binaries, one for each profile. The GUI selection
doesn't actually do anything yet. There will be a launcher in a future
release that loads each profile's respective binary.
I reverted away from blargg's SMP library for the time being, in favor
of my own. This will fix most of the csnes/bsnes-performance bugs. This
causes a 10% speed hit on 64-bit platforms, and a 15% speed hit on
32-bit platforms. I hope to be able to regain that speed in the future,
I may also experiment with creating my own fast-SMP core which drops bus
hold delays and TEST register support (never used by anything, ever.)
Save states now work in all three cores, but they are not
cross-compatible. The profile name is stored in the description field of
the save states, and it won't load a state if the profile name doesn't
match.
The debugger only works on the research target for now. Give it time and
it will return for the other targets.
Other than that, let's please resume testing on all three once again.
See how far we get this time :)
I can confirm the following games have issues on the performance
profile:
- Armored Police Metal Jacket (minor logo flickering, not a big deal)
- Chou Aniki (won't start, so obviously unplayable)
- Robocop vs The Terminator (major in-game flickering, unplayable)
Anyone still have that gigantic bsnes thread archive from the ZSNES
forum? Maybe I posted about how to fix those two broken games in there,
heh.
I really want to release this as v1.0, but my better judgment says we
need to give it another week. Damn.
2010-10-20 11:22:44 +00:00
|
|
|
enum : bool { Threaded = true };
|
|
|
|
alwaysinline void step(unsigned clocks);
|
|
|
|
alwaysinline void synchronize_cpu();
|
|
|
|
|
2010-08-09 13:31:09 +00:00
|
|
|
#include "memory/memory.hpp"
|
|
|
|
#include "mmio/mmio.hpp"
|
|
|
|
#include "render/render.hpp"
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
uint16 *surface;
|
|
|
|
uint16 *output;
|
|
|
|
|
|
|
|
uint8 ppu1_version;
|
|
|
|
uint8 ppu2_version;
|
|
|
|
|
2010-08-09 13:31:09 +00:00
|
|
|
static void Enter();
|
|
|
|
void add_clocks(unsigned clocks);
|
|
|
|
|
|
|
|
uint8 region;
|
|
|
|
unsigned line;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2010-08-09 13:31:09 +00:00
|
|
|
enum { NTSC = 0, PAL = 1 };
|
|
|
|
enum { BG1 = 0, BG2 = 1, BG3 = 2, BG4 = 3, OAM = 4, BACK = 5, COL = 5 };
|
|
|
|
enum { SC_32x32 = 0, SC_64x32 = 1, SC_32x64 = 2, SC_64x64 = 3 };
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2010-08-09 13:31:09 +00:00
|
|
|
struct {
|
|
|
|
bool interlace;
|
|
|
|
bool overscan;
|
|
|
|
} display;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2010-08-09 13:31:09 +00:00
|
|
|
struct {
|
|
|
|
//$2101
|
|
|
|
uint8 oam_basesize;
|
|
|
|
uint8 oam_nameselect;
|
|
|
|
uint16 oam_tdaddr;
|
|
|
|
|
|
|
|
//$210d-$210e
|
|
|
|
uint16 m7_hofs, m7_vofs;
|
|
|
|
|
|
|
|
//$211b-$2120
|
|
|
|
uint16 m7a, m7b, m7c, m7d, m7x, m7y;
|
|
|
|
} cache;
|
|
|
|
|
|
|
|
alwaysinline bool interlace() const { return display.interlace; }
|
|
|
|
alwaysinline bool overscan() const { return display.overscan; }
|
|
|
|
alwaysinline bool hires() const { return (regs.pseudo_hires || regs.bg_mode == 5 || regs.bg_mode == 6); }
|
|
|
|
|
|
|
|
uint16 light_table[16][32768];
|
|
|
|
uint16 mosaic_table[16][4096];
|
|
|
|
void render_line();
|
|
|
|
|
|
|
|
void update_oam_status();
|
|
|
|
//required functions
|
|
|
|
void scanline();
|
|
|
|
void render_scanline();
|
|
|
|
void frame();
|
Updated to v067r21 release.
byuu says:
This moves toward a profile-selection mode. Right now, it is incomplete.
There are three binaries, one for each profile. The GUI selection
doesn't actually do anything yet. There will be a launcher in a future
release that loads each profile's respective binary.
I reverted away from blargg's SMP library for the time being, in favor
of my own. This will fix most of the csnes/bsnes-performance bugs. This
causes a 10% speed hit on 64-bit platforms, and a 15% speed hit on
32-bit platforms. I hope to be able to regain that speed in the future,
I may also experiment with creating my own fast-SMP core which drops bus
hold delays and TEST register support (never used by anything, ever.)
Save states now work in all three cores, but they are not
cross-compatible. The profile name is stored in the description field of
the save states, and it won't load a state if the profile name doesn't
match.
The debugger only works on the research target for now. Give it time and
it will return for the other targets.
Other than that, let's please resume testing on all three once again.
See how far we get this time :)
I can confirm the following games have issues on the performance
profile:
- Armored Police Metal Jacket (minor logo flickering, not a big deal)
- Chou Aniki (won't start, so obviously unplayable)
- Robocop vs The Terminator (major in-game flickering, unplayable)
Anyone still have that gigantic bsnes thread archive from the ZSNES
forum? Maybe I posted about how to fix those two broken games in there,
heh.
I really want to release this as v1.0, but my better judgment says we
need to give it another week. Damn.
2010-10-20 11:22:44 +00:00
|
|
|
void enter();
|
2010-08-09 13:31:09 +00:00
|
|
|
void power();
|
|
|
|
void reset();
|
|
|
|
|
|
|
|
void serialize(serializer&);
|
2010-08-09 13:28:56 +00:00
|
|
|
PPU();
|
2010-08-09 13:31:09 +00:00
|
|
|
~PPU();
|
|
|
|
|
|
|
|
friend class PPUDebugger;
|
2010-08-09 13:28:56 +00:00
|
|
|
};
|
2010-08-09 13:31:09 +00:00
|
|
|
|
|
|
|
#if defined(DEBUGGER)
|
|
|
|
#include "debugger/debugger.hpp"
|
|
|
|
extern PPUDebugger ppu;
|
|
|
|
#else
|
|
|
|
extern PPU ppu;
|
|
|
|
#endif
|