LDA $8000
PHA
-snip-
The first instruction set is supposed to load the current page swapped in from the PPU register, but it probably won't work in its current state. Not sure if mapper 33 will let me load the current page
Remember that $8000-FFFF is PRG-ROM, so LDA $8000 will read from PRG, not from the mapper register. Most (nearly all, in fact) mapper registers are write-only -- meaning you cannot read their current contents.
or if I'll have to find the code that writes the page number somewhere in RAM.
This is exactly what you'll likely have to do. One way you can try and find this is to set a breakpoint on writes to this specific register and examine the routine that's writing. If you see something like:
STA $F0
STA $8000
Then $F0 likely has the page number. This is common practice in a lot of games, however it's not a sure thing! it's possible that the games do not keep track of the page they swap in. If this is the case you might be able to edit the swap routine (assuming there's only 1 or 2 of them) to keep track of it. This will work if the game JSRs to a common routine every time it wants to swap (which again is common practice, but not guaranteed).
And finally when I'm writing the page, I'm not sure where to right it to. From what I understand each PRG slot has a range where stuff can be written. It's probably in Disch's doc, but I'm not recognizing the information.
from the doc:
PRG Setup:
---------------------------
$8000 $A000 $C000 $E000
+-------+-------+-------+-------+
| $8000 | $8001 | { -2} | { -1} |
+-------+-------+-------+-------+
If you're trying to swap the page at $8000-9FFF, then $8000 is the address you want to write to. If you want to swap the page at $A000-BFFF, then you want to write to $8001.
also:
Registers:
--------------------------
Range,Mask: $8000-BFFF, $A003
Range,Mask pairings indicate the register is mirrored across several addresses. The main readme in the doc package explains this further. Though really -- you don't need to write to mirrored addresses. $8000 and $8001 are all you really need.