Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Doki Doki Panic Kaiser script
- This creates a partial dump-- you have to, in some way, combine the RAM image with the PRG image
- */
- board <- {
- /* imaginary number, needs to be converted to a UNIF with KS-7030 mapper */
- mappernum = 103,
- cpu_rom = {
- size_base = 0x14000, size_max = 0x14000, banksize = 0xC00
- },
- ppu_rom = {
- size_base = 0, size_max = 0, banksize = 0
- },
- cpu_ram = {
- size_base = 0x4000, size_max = 0x4000, banksize = 0x400
- },
- ppu_ramfind = false, vram_mirrorfind = true
- };
- function cpu_dump(d, pagesize, banksize) {
- cpu_read(d, 0x8000, 0x4000);
- cpu_read(d, 0xc000, 0x4000);
- /* PRG at 0xb800-0xc800 is a phantom bank that can only be used for 0x8000-0xFFFF */
- /* meanwhile 0xc800-0xd800 banks out of the normal address space, 4K banks, a max of 64K? */
- /* accessing it looks weird though */
- for (local i = 0; i < 16; i += 1) {
- /* writing through this range appears to work, but only once. when changing to 0, 1, 5 or whatever, it doesn't change again */
- cpu_write(d, 0x9000, i);
- cpu_read(d, 0xC000, banksize);
- }
- }
- function cpu_ram_access(d, pagesize, banksize)
- {
- for (local i = 0; i < 16; i += 1) {
- cpu_write(d, 0x9000, i);
- cpu_ram_rw(d, 0x6C00, banksize);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement