Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. /*
  2. Doki Doki Panic Kaiser script
  3.  
  4. This creates a partial dump-- you have to, in some way, combine the RAM image with the PRG image
  5. */
  6.  
  7. board <- {
  8. /* imaginary number, needs to be converted to a UNIF with KS-7030 mapper */
  9. mappernum = 103,
  10. cpu_rom = {
  11. size_base = 0x14000, size_max = 0x14000, banksize = 0xC00
  12. },
  13. ppu_rom = {
  14. size_base = 0, size_max = 0, banksize = 0
  15. },
  16. cpu_ram = {
  17. size_base = 0x4000, size_max = 0x4000, banksize = 0x400
  18. },
  19. ppu_ramfind = false, vram_mirrorfind = true
  20. };
  21.  
  22. function cpu_dump(d, pagesize, banksize) {
  23. cpu_read(d, 0x8000, 0x4000);
  24. cpu_read(d, 0xc000, 0x4000);
  25. /* PRG at 0xb800-0xc800 is a phantom bank that can only be used for 0x8000-0xFFFF */
  26. /* meanwhile 0xc800-0xd800 banks out of the normal address space, 4K banks, a max of 64K? */
  27. /* accessing it looks weird though */
  28. for (local i = 0; i < 16; i += 1) {
  29. /* writing through this range appears to work, but only once. when changing to 0, 1, 5 or whatever, it doesn't change again */
  30. cpu_write(d, 0x9000, i);
  31. cpu_read(d, 0xC000, banksize);
  32. }
  33. }
  34.  
  35. function cpu_ram_access(d, pagesize, banksize)
  36. {
  37. for (local i = 0; i < 16; i += 1) {
  38. cpu_write(d, 0x9000, i);
  39. cpu_ram_rw(d, 0x6C00, banksize);
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement