quicknes: support Bite Off
This commit is contained in:
parent
5415f51de0
commit
7e45a6810e
Binary file not shown.
|
@ -121,7 +121,7 @@ protected:
|
|||
|
||||
// Map 'size' bytes from 'CHR + bank * size' to PPU address space starting at 'addr'
|
||||
void set_chr_bank( nes_addr_t addr, bank_size_t size, int bank );
|
||||
void set_chr_bank_ex( nes_addr_t addr, bank_size_t size, int bank );
|
||||
void set_chr_bank_ex( nes_addr_t addr, bank_size_t size, int bank ); // mmc24 only
|
||||
|
||||
// Set PPU mirroring. All mappings implemented using mirror_manual().
|
||||
void mirror_manual( int page0, int page1, int page2, int page3 );
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
enum { vaddr_clock_mask = 0x1000 };
|
||||
void set_nt_banks( int bank0, int bank1, int bank2, int bank3 );
|
||||
void set_chr_bank( int addr, int size, long data );
|
||||
void set_chr_bank_ex( int addr, int size, long data );
|
||||
void set_chr_bank_ex( int addr, int size, long data ); // mmc24 only
|
||||
|
||||
// Nametable and CHR RAM
|
||||
enum { nt_ram_size = 0x1000 };
|
||||
|
@ -103,13 +103,16 @@ private:
|
|||
// Mapping
|
||||
enum { chr_page_size = 0x400 };
|
||||
long chr_pages [chr_addr_size / chr_page_size];
|
||||
long chr_pages_ex [chr_addr_size / chr_page_size];
|
||||
long chr_pages_ex [chr_addr_size / chr_page_size]; // mmc24 only
|
||||
long map_chr_addr( unsigned a ) /*const*/
|
||||
{
|
||||
if (!mmc24_enabled)
|
||||
return chr_pages [a / chr_page_size] + a;
|
||||
|
||||
// mmc24 calculations
|
||||
|
||||
int page = a >> 12 & 1;
|
||||
// can't check against bit 3 of address, because quicknes never actually fetches those
|
||||
int newval0 = (a & 0xff0) != 0xfd0;
|
||||
int newval1 = (a & 0xff0) == 0xfe0;
|
||||
|
||||
|
@ -126,8 +129,8 @@ private:
|
|||
}
|
||||
byte* nt_banks [4];
|
||||
|
||||
bool mmc24_enabled;
|
||||
byte mmc24_latched [2];
|
||||
bool mmc24_enabled; // true if mmc24 regs need to be latched and checked
|
||||
byte mmc24_latched [2]; // current latch value for the first\second 4k of memory
|
||||
|
||||
// CHR data
|
||||
byte const* chr_data; // points to chr ram when there is no read-only data
|
||||
|
|
|
@ -176,7 +176,16 @@ void Nes_Ppu_Rendering::draw_background_( int remain )
|
|||
byte const* nametable2 = get_nametable( addr ^ 0x400 );
|
||||
int count2 = addr & 31;
|
||||
int count = 32 - count2 - left_clip;
|
||||
if ( pixel_x )
|
||||
|
||||
// this conditional is commented out because of mmc2\4
|
||||
// normally, the extra row of pixels is only fetched when pixel_ x is not 0, which makes sense
|
||||
// but here, we need a correct fetch pattern to pick up 0xfd\0xfe tiles off the edge of the display
|
||||
|
||||
// this doesn't cause any problems with buffer overflow because the framebuffer we're rendering to is
|
||||
// already guarded (width = 272)
|
||||
// this doesn't give us a fully correct ppu fetch pattern, but it's close enough for punch out
|
||||
|
||||
//if ( pixel_x )
|
||||
count2++;
|
||||
|
||||
byte const* attr_table = &nametable [0x3c0 | (addr >> 4 & 0x38)];
|
||||
|
|
Loading…
Reference in New Issue