Printing the screen using PrinterDebug routine (EN Yellow)
Posted by: Torchickens
Date: 2019-04-10 07:30:55
Put these at item 3 and then setup an arbitrary code execution (ACE) method to run it, such a stored Pokémon bootstrap code for ws m or the placement of ThunderStone x211 at item 42 in the expanded item pack.
Awakening x 58
Carbos x78
X Accuracy x 121
X Attack x 64
TM05 x132
Lemonade x201
Connect your Game Boy Printer and then run your ACE (the order may matter; make sure your Game Boy Printer is connected before running the code). If everything goes to plan, there will be a short delay and the game will print out what was on the screen. :) You may want to print out a Pokédex entry the normal way (Pokédex>Print) to confirm your Game Boy Printer works first. This might also work on a Game Boy Printer emulator but I've yet to confirm.
(Could be optimised for better items. This exact setup was not used and there is a chance (as this changes the c register in addition to the b register) there may be complications, which I unfortunately can't test right now as my Game Boy Printer seems to be low on battery. Any further verifications would be much appreciated.)
Long explanation:
In EN Yellow, using a short arbitrary code execution program and a Game Boy Printer, it is possible to print out a copy of the screen. Not much work is required as this is already a function of 3A:4E79 (PrinterDebug), which is apparently unused.
The base code to do this is as such;
ld b,3A
ld hl,4E79
call 3e84
ret
As always, you will need to adjust this so you can get items/whatever.
By using different entry points, you can print a wide range of things.
'Anything':
1. OAM DMA hijacking (unconfirmed)
Printing the overworld with your inventory open
1. Glitch item ACE (confirmed)
Printing overworld states (no text boxes, no player movements active):
1. Map script ACE (e.g. via little endian D36D/D36E pointer) (confirmed)
Printing a wider range of overworld states:
1. CC57/8 ACE (unconfirmed)
Printing battle scenes:
1. ACE executing glitch moves (confirmed)
2. Using a glitch item in battle (confirmed)
Printing a scene during the Pikachu's Beach minigame:
1. Pikachu's Beach ACE (confirmed, aided with cheating device but non-cheating device method described in article may work too)
Here is one example of what it looks like on real hardware using glitch item ACE:
[img]https://i.imgur.com/NhSBnEG.png[/img]
Notes:
There will be a short delay before your Game Boy Printer works. Sometimes when you do this, numbers are printed on the screen. At a first glance, I'm unsure if this is part of the routine and/or is bugged but the answer could probably be found in the Pokémon Yellow disassembly.
If the map is a Glitch City, the game will print what it looks like as if the Start menu was open (if it is different when closed the game normally won't print that version).
Using more complex ACE, you could in theory put anything on the screen (within the limitations of the Game Boy Color hardware) you want and then print it.