This is not something that cheat engines tend to handle, however if it is for an emulator you might be able to get something done.
The DS is something of a tarted up GBA so it might help to understand that first
http://problemkaputt.de/gbatek.htm#lcdiodisplaycontrol
DS stuff
http://problemkaputt.de/gbatek.htm#dsvideobgmodescontrol
http://problemkaputt.de/gbatek.htm#dsvideodisplaysystemblockdiagram
You then get to tickle displaycnt (display control)
Bits 8 though 12 as seen on the GBA link first of all, possible again for the B screen as well if necessary.
People have done stuff like this for forcing screens to be on different displays than intended. For emulators that don't care it is one thing, for hardware or accuracy focused emulators that do then that is harder.
In an ideal world you would be able to do a masked write.
https://doc.kodewerx.org/hacking_nds.html
Hack #2 - ORR/AND/ADD Codes | |
---|
| |
| |
023FE424 E0033004 | Makes the D4 code type execute a 'AND' instruction. |
Data Register Codes | |
---|
Type 0xD4
Add Value
D4000000 XXXXXXXX | Adds 'XXXXXXXX' to the data register used by codetypes 0xD6 - 0xDB.
More arithmetical/logical operations can be set using the 'NDS AR HACK #2'. |
Type 0xD9
32-Bit Load
D9000000 XXXXXXXX | Loads the word at [XXXXXXXX+offset] and stores it in the'Dx data register'. |
4000000h - DISPCNT - LCD Control (Read/Write)
Bit Expl.
0-2 BG Mode (0-5=Video Mode 0-5, 6-7=Prohibited)
3 Reserved / CGB Mode (0=GBA, 1=CGB; can be set only by BIOS opcodes)
4 Display Frame Select (0-1=Frame 0-1) (for BG Modes 4,5 only)
5 H-Blank Interval Free (1=Allow access to OAM during H-Blank)
6 OBJ Character VRAM Mapping (0=Two dimensional, 1=One dimensional)
7 Forced Blank (1=Allow FAST access to VRAM,Palette,OAM)
8 Screen Display BG0 (0=Off, 1=On)
9 Screen Display BG1 (0=Off, 1=On)
10 Screen Display BG2 (0=Off, 1=On)
11 Screen Display BG3 (0=Off, 1=On)
12 Screen Display OBJ (0=Off, 1=On)
13 Window 0 Display Flag (0=Off, 1=On)
14 Window 1 Display Flag (0=Off, 1=On)
15 OBJ Window Display Flag (0=Off, 1=On)
|
The first should load the contents of the display register into the AR code's own internal tweaks. The AND instruction will hopefully have been done or otherwise available. Delete after the # to make it a more normal code list.
Most basic of codes that likely won't work
023FE424 E0033004 #Changes to add function to instead be Boolean AND
D9000000 04000000 # Loads the display controller data into the internal register
D4000000 FF0FFFFF # ANDS the display controller data such as to set all the background layers disabled.
D6000000 04000000 # Writes it back to the dispcnt
D3000000 00000000 # Resets the offset
D0000000 00000000 # Terminates the loop.
Whether you add a button prompt to it is up to you but that is covered elsewhere.
11111111000011111111111111111111 in binary is FF0FFFFF. Hopefully you can change the relevant 0s to 1 as that one will probably disable all layers (sprites still around though). Anyway AND if you have not done Boolean logic in a while is 1 only when both the item being ANDed and the thing itself are 1. That is to say having everything you don't want changed be a 1 will result in the 0s in your provided AND participant turning their matching counterparts to 0 as well.
I don't know how often the game will enable the layers if you disable them (some will do it nearly every frame, others not so much). Again this is also a cheat engine which normally only speaks to normal memory and struggles a bit with registers. If you want to do it in hardware then you would do much the same thing and set the relevant bits of the dispcnt (that only does the A engine, 041000000 is the B engine) to be low. This is a bit more involved than a simple write as
https://gbatemp.net/threads/action-replay-code-to-switch-screens.355486/page-2 would indicate.
If in bizhawk some systems do support lua enabling and disabling layers
https://tasvideos.org/Bizhawk/LuaFunctions (click NES and SNES)
Sadly its DS aspect (based on melonds it looks like) does not support this if that is anything to go by. Whether you could use Lua to do the writing above (it will support memory manipulation, possibly even quite fancy by looking at other things and determining if it should be doing it).
Option the... we will call it third.
What is in the layer you want disabled? If you can find it in the game itself then you can possibly overwrite all the relevant pixels with alpha and achieve much the same effect. Most do this more for simple backgrounds or HUD elements but nothing stopping you from doing it for something more involved.