I found a code address of TG16 games which seems to represent energy gage.
It is real address which contains health because it has same last 3 digit address with code results of Magic-Engine's build-in cheat, and I tried to set breakpoint on this address.
but I have typed "bpset 1F20d2" on debug windows,but It doesn't break at all whensoever character got demaged by enemy in gameplay.
I don't thinks it is wrong address because In mednafen,the address which I found out is "001f00d2" which is very similar to search results of mess's and it really break in mednafen emulator whenever got demaged.
<action>:maincpu.ppb@1F20D2=3F</action>
how can I set breakpoint on above address? (maincpu.ppb@1F20D2)
and what is difference between watchpoint and breakpoint?
and Can I distinguish write and read breakpoint like mednafen emulator when I set breakpoint on certain address?
how can I set breakpoint?
- Pugsy
- Posts: 3675
- Joined: Fri Aug 17, 2001 12:59 am
- Location: North Wales, UK.
- Has thanked: 1 time
- Been thanked: 16 times
- Contact:
Re: how can I set breakpoint?
You place a breakpoint on memory that is executed, ie it contains code that is run. Basically when you put a breakpoint on an address you are basically saying when PC=AN_ADDRESSS break. If an address contains no code a breakpoint on it will have no affect.
You place a watchpoint on memory that is either written or read, so for example if you find a RAM infinite lives address (1F20D2) that you poke with 05 to always have 5 lives you would place a watchpoint on that address that would either break when that address is written or read.
So,
wp 1F20D2,1,w
would break after 1F20D2 has a new value written to it
wp 1F20D2,1,r
would break after 1F20D2 has been read
wp 1F20D2,1,rw
would break after 1F20D2 has a new value written to it OR after 1F20D2 has been read.
TG16/PCE Engine memory can be a bit strange regarding watchpoints though (known MAME bug), so you may need to do something like this:-
wp 0,ffffff,rw,wpaddr==1F20D2
You place a watchpoint on memory that is either written or read, so for example if you find a RAM infinite lives address (1F20D2) that you poke with 05 to always have 5 lives you would place a watchpoint on that address that would either break when that address is written or read.
So,
wp 1F20D2,1,w
would break after 1F20D2 has a new value written to it
wp 1F20D2,1,r
would break after 1F20D2 has been read
wp 1F20D2,1,rw
would break after 1F20D2 has a new value written to it OR after 1F20D2 has been read.
TG16/PCE Engine memory can be a bit strange regarding watchpoints though (known MAME bug), so you may need to do something like this:-
wp 0,ffffff,rw,wpaddr==1F20D2
Pugsy
Servicing your cheating needs since 1985
Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
Servicing your cheating needs since 1985
Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
Re: how can I set breakpoint?
Thanks Pugsy very much for your rapid reply.
My address result(1F20D2) is wrong although I think it is searched using mess's cheat system by right way.
I discovered right energy address from pce.xml file which was included in "MESS TG16 V1.01 Cheat File FOR MESS 0.129" and The right address is not "1F20D2" but "1F00D2".(I can't understand why mess's cheat system can not found right address..)
<cheat desc="-= JACKIE CHAN'S ACTION KUNG FU (U) [H1] =-" />
- <cheat desc="Infinite Energy">
- <script state="run">
<action>main.rb@1F00D2=3F</action>
</script>
I have placed wp on this address(1F00D2) and It really break whenever got damaged.
but I want trace back to origin address where primarily triggered this energy decrease.
Is There any command for dump "flow of code routine" whenever any break occurs? or disassembly option for dissetting code structure?
My address result(1F20D2) is wrong although I think it is searched using mess's cheat system by right way.
I discovered right energy address from pce.xml file which was included in "MESS TG16 V1.01 Cheat File FOR MESS 0.129" and The right address is not "1F20D2" but "1F00D2".(I can't understand why mess's cheat system can not found right address..)
<cheat desc="-= JACKIE CHAN'S ACTION KUNG FU (U) [H1] =-" />
- <cheat desc="Infinite Energy">
- <script state="run">
<action>main.rb@1F00D2=3F</action>
</script>
I have placed wp on this address(1F00D2) and It really break whenever got damaged.
but I want trace back to origin address where primarily triggered this energy decrease.
Is There any command for dump "flow of code routine" whenever any break occurs? or disassembly option for dissetting code structure?
- Pugsy
- Posts: 3675
- Joined: Fri Aug 17, 2001 12:59 am
- Location: North Wales, UK.
- Has thanked: 1 time
- Been thanked: 16 times
- Contact:
Re: how can I set breakpoint?
I think you missed what I said.....as I said above:-
Pictures speak better than words, so:-
The important word is AFTER.would break after 1F20D2 has a new value written to it
Pictures speak better than words, so:-
Pugsy
Servicing your cheating needs since 1985
Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
Servicing your cheating needs since 1985
Grab the latest cheat collection:
MAME 0.264 XML cheat collection (3 APRIL 2024) from http://www.mamecheat.co.uk or direct from:-
https://mega.nz/file/SxsQUJoT#jBdz6GLm_ ... QzFGSMms2c (ZIP Archive 3.8 MB)
Re: how can I set breakpoint?
thanks for your detail reply.
As English is not my native language,I have always very terribly difficult in writting in English,so I usually only have writren really necessary sentance and omitted why I need to know flow of the decrease routine which seems to cause misunderstand, I'm sorry for that..
what I really require(search for) is the way to make no flashing(and no cowering if possible.) invincibility for any PCE/PCECD games.(especially shmups ,action genre)
A half years ago, I encountered an pce/tg16 invincibility code for magic engine emulator(Jackie Chan)(INVINCIBILITY 000140:208)which made by VisitntX
It is no flash and no cowering when charactor damaged, I think if I found the way which he use to make this code,I would apply this method to any other pce games, so I have tried to anatomy this code and even to question to other forum(gamehacking) about this problem, but there is no useful answer and eventually,I failed to discover the way he make this code.
http://gamehacking.org/vb/threads/5836- ... de-anatomy
I followed Your guide,but it cannot remove flashing when charactor is damaged by enemys.
As English is not my native language,I have always very terribly difficult in writting in English,so I usually only have writren really necessary sentance and omitted why I need to know flow of the decrease routine which seems to cause misunderstand, I'm sorry for that..
what I really require(search for) is the way to make no flashing(and no cowering if possible.) invincibility for any PCE/PCECD games.(especially shmups ,action genre)
A half years ago, I encountered an pce/tg16 invincibility code for magic engine emulator(Jackie Chan)(INVINCIBILITY 000140:208)which made by VisitntX
It is no flash and no cowering when charactor damaged, I think if I found the way which he use to make this code,I would apply this method to any other pce games, so I have tried to anatomy this code and even to question to other forum(gamehacking) about this problem, but there is no useful answer and eventually,I failed to discover the way he make this code.
http://gamehacking.org/vb/threads/5836- ... de-anatomy
I followed Your guide,but it cannot remove flashing when charactor is damaged by enemys.