Skip to content

Instantly share code, notes, and snippets.

@RGBA-CRT
Created May 14, 2025 13:16
Show Gist options
  • Save RGBA-CRT/2c4e5bd7c620feba13f8cfe9b202462b to your computer and use it in GitHub Desktop.
Save RGBA-CRT/2c4e5bd7c620feba13f8cfe9b202462b to your computer and use it in GitHub Desktop.
Kazzo/Anago script for TV-NET MC-1200
/*
ref: https://www.nesdev.org/wiki/User:Fiskbit#TV-NET_MC-1200
*/
board <- {
mappernum = 7,
cpu_rom = {
size_base = 0x8000, size_max = 0x8000, banksize = 0x1000
},
ppu_rom = {
size_base = 0, size_max = 0, banksize = 0x2000
},
ppu_ramfind = false, vram_mirrorfind = true
};
function cpu_dump(d, pagesize, banksize) {
/*
6005h=0 : BIOS ROM (32K) bank 0 (same as 8000h)
6005h=1 : BIOS ROM (32K) bank 1 (same as 9000h) banksize = 1000h
6005h=2 : BIOS ROM (32K) bank 2 (same as A000h) banksize = 1000h
6005h=3 : BIOS ROM (32K) bank 3 (same as B000h) banksize = 1000h
6005h=4 : 4bit width (same as C000h) banksize = 1000h
...
6005h=2345 : BIOS ROM (32K) bank 2 (same as A000h) banksize = 1000h
*/
cpu_write(d, 0x6000, 8);
cpu_write(d, 0x6007, 8);
cpu_write(d, 0x6000, 4);
cpu_write(d, 0x6001, 8);
cpu_write(d, 0x6006, 4);
cpu_write(d, 0x6006, 3);
cpu_write(d, 0x6003, 4);
for(local i = 0; i < pagesize; i += 1){
cpu_write(d, 0x6005, i);
cpu_read(d, 0xe000, banksize);
}
}
function ppu_dump(d, pagesize, banksize) {
ppu_read(d, 0, banksize);
}
/*
ref: https://www.nesdev.org/wiki/User:Fiskbit#TV-NET_MC-1200
*/
board <- {
mappernum = 700,
cpu_rom = {
size_base = 0x40000, size_max = 0x80000, banksize = 0x1000
},
ppu_rom = {
size_base = 0, size_max = 0, banksize = 0x2000
},
ppu_ramfind = false, vram_mirrorfind = true
};
function cpu_dump(d, pagesize, banksize) {
/*
6005h=0 : BIOS ROM (32K) bank 0 (same as 8000h)
6005h=1 : BIOS ROM (32K) bank 1 (same as 9000h) banksize = 1000h
6005h=2 : BIOS ROM (32K) bank 2 (same as A000h) banksize = 1000h
6005h=3 : BIOS ROM (32K) bank 3 (same as B000h) banksize = 1000h
6005h=4 : 4bit width (same as C000h) banksize = 1000h
...
6005h=2345 : BIOS ROM (32K) bank 2 (same as A000h) banksize = 1000h
*/
cpu_write(d, 0x6000, 8);
cpu_write(d, 0x6007, 8);
cpu_write(d, 0x6000, 4);
cpu_write(d, 0x6001, 8);
cpu_write(d, 0x6006, 4);
cpu_write(d, 0x6006, 3);
cpu_write(d, 0x6003, 4);
for(local i = 0; i < pagesize; i += 2){
cpu_write(d, 0x6003, i);
cpu_read(d, 0xc000, banksize);
cpu_read(d, 0xd000, banksize);
}
}
function ppu_dump(d, pagesize, banksize) {
ppu_read(d, 0, banksize);
}
function program_initalize(d, cpu_banksize, ppu_banksize)
{
cpu_command(d, 0, 0x8000, cpu_banksize);
cpu_command(d, 0x02aa, 0xc000, cpu_banksize);
cpu_command(d, 0x0555, 0xc000, cpu_banksize);
ppu_command(d, 0, 0x0000, ppu_banksize);
ppu_command(d, 0x02aa, 0x0000, ppu_banksize);
ppu_command(d, 0x0555, 0x0000, ppu_banksize);
}
function cpu_transfer(d, start, end, cpu_banksize)
{
cpu_program(d, 0x8000, cpu_banksize);
cpu_program(d, 0xc000, cpu_banksize);
}
function ppu_transfer(d, start, end, ppu_banksize)
{
ppu_program(d, 0x0000, ppu_banksize);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment