mirror of
https://github.com/orangeglo/gbnp.git
synced 2026-04-25 07:37:06 -05:00
Add power cart hack
This commit is contained in:
parent
09974c4ef0
commit
d06b4fac8c
|
|
@ -90,7 +90,8 @@ let app = new Vue({
|
|||
for (let i = 0; i < this.roms.length; i++) { this.roms[i].updateBitmap(this.fontIndex); }
|
||||
},
|
||||
disableCGB: function() { this.processor.disableCGB = this.disableCGB; },
|
||||
forceDMG: function() { this.processor.forceDMG = this.forceDMG; }
|
||||
forceDMG: function() { this.processor.forceDMG = this.forceDMG; },
|
||||
cartType: function() { this.processor.cartType = this.cartType; }
|
||||
},
|
||||
methods: {
|
||||
addMenu: function(e) {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ const BITMAP_PREVIEW_BYTES = [
|
|||
[0x66, 0x66, 0x66, 0xFF], // dark grey
|
||||
[0x00, 0x00, 0x00, 0xFF] // black
|
||||
]
|
||||
const IG_POWER_CART_HACK = [0x3E, 0x01, 0xEA, 0x00, 0x20, 0xF0, 0xFD, 0x01, 0x00, 0x20, 0x4F, 0x0A, 0xEA, 0x00, 0x60];
|
||||
const FONTS = [
|
||||
{ style: 'normal 8px Gameboy', y: 7 },
|
||||
{ style: 'normal 8px PokemonGB', y: 7 },
|
||||
|
|
@ -197,6 +198,7 @@ class Processor {
|
|||
this.disableCGB = false;
|
||||
this.forceDMG = false;
|
||||
this.tickerBitmap = [];
|
||||
this.cartType = 0;
|
||||
}
|
||||
|
||||
romTotalKB() {
|
||||
|
|
@ -301,6 +303,12 @@ class Processor {
|
|||
// copy menu data
|
||||
romFile.writeBytes(this.menu.data);
|
||||
|
||||
// apply iG power cart hack
|
||||
if (this.cartType === 1) {
|
||||
romFile.seek(0x130E);
|
||||
romFile.writeBytes(IG_POWER_CART_HACK);
|
||||
}
|
||||
|
||||
// apply cgb hack
|
||||
if (this.disableCGB) {
|
||||
romFile.seek(0x143);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user