Program Counters mean anything for msu

Go down

Program Counters mean anything for msu Empty Program Counters mean anything for msu

Post by Polargames Thu 26 Jul 2018 - 18:48

Hello everyone, I would like to state that this is just a general qusten and thats all. I was playing around last night and the game that I was debugging for fun I stumbled upond the Program Counters. I am still learning how game music work so I do not know what I have found. Do these mean anything? I have also found something called In and out ports. What are those? And one last thing for the in and out ports the in ports have 01 40 00 00, but the out is 00 00 00 00. What does that mean? I am very confused? Thank you for taking the time to read my post. I hope you have a great day. Very Happy
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Conn Thu 26 Jul 2018 - 19:35

*lol, nobody is able to help you with such infos...

A general info to all, I have a strict schedule and am running out of time with all my stuff and will not have as much time to run this msu section anymore. I'll try my best to help as much as it is possible, but please don't mind if some requests stay unreplayed (at least form my side).
Conn
Conn

Program Counters mean anything for msu Image212

Since : 2013-06-30

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Polargames Thu 26 Jul 2018 - 22:04

Conn wrote:*lol, nobody is able to help you with such infos...

A general info to all, I have a strict schedule and am running out of time with all my stuff and will not have as much time to run this msu section anymore. I'll try my best to help as much as it is possible, but please don't mind if some requests stay unreplayed (at least form my side).

Ok, thank you Conn😕 . I was just woundering. I had found those and had no idea what they were, also I was not plaining on doing any msu at all. I had put that into my title because I did not know where a music qusten would be in place, and I know about pcms and that is why I posted it here. I know your general info was not just directed to me and I am not mad or anything. I just had a qusten that I had though woould be ok to be posted here. Sorry if you though it was a request, I am 100% leting you know it was not, just wanting to learn something new.
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Conn Fri 27 Jul 2018 - 5:14

No need to apologize for anything, this hobby is just a bit time intense, and I have little time only at the moment. Might get better though.

As far I know program counters is used by the CPU to know how many hex it must shift, e.g., LDA long/short (3 vs 2 bytes) and where to return after a JSL (together with Stack values).

This isn't needed for hacking since this is the intern architecture of the machine, like you cannot add/delete any opcodes.
Conn
Conn

Program Counters mean anything for msu Image212

Since : 2013-06-30

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Polargames Fri 27 Jul 2018 - 19:44

Conn wrote:No need to apologize for anything, this hobby is just a bit time intense, and I have little time only at the moment. Might get better though.

As far I know program counters is used by the CPU to know how many hex it must shift, e.g., LDA long/short (3 vs 2 bytes) and where to return after a JSL (together with Stack values).

This isn't needed for hacking since this is the intern architecture of the machine, like you cannot add/delete any opcodes.

O, I did not know you had a time crunch. Must be a huge project your working on, or a hard one like w3d was? I did not know if I had my post come off as a request and I was confused on the general information also. But thank you for explaing it to me. Also thank you for answering my post also, now LDA can lead a person to LDX correct, What I mean by that I have read that it can guide a person to the location of the SPC and with the right know how can help you find a break in the game code? Or am I way off. If I am thats find I had read about asm from romhacking before I posted my qusten here because the document made it sound like if you found the in and out ports of the SPC that you found the $2004 zone so to speak. I did not know if that was right at all thought because the doc that I had read was from 1998. So I thought it might be outdated. Thats why I had asked here. Did your time get better though?
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Conn Sat 28 Jul 2018 - 4:16

No, I just took your post as opportunity to make a general announcement to draw back a little. MSU is like a hydra (to repeat Pev's word), you cut one head, 5 new emerges. There are always nice titles (Mario RPG, Zombie ate my neighbours, Lufia,...) but for me it's getting too much now. Might change again (dunno how often I retired), but right now, I simply don't have the time anymore.

Regarding your questions: This is a very good guide you may want to work through:
https://www.smwcentral.net/?p=section&a=details&id=14268
I once made a simple asm teaching tutorial:
https://www.zeldix.net/t134-coding-for-absolute-beginners
MSU stuff:
http://helmet.kafuka.org/msu1.htm
SPC stuff:
https://www.smwcentral.net/?p=viewthread&t=38116

Much luck Wink
Conn
Conn

Program Counters mean anything for msu Image212

Since : 2013-06-30

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Polargames Sat 28 Jul 2018 - 19:59

Conn wrote:No, I just took your post as opportunity to make a general announcement to draw back a little. MSU is like a hydra (to repeat Pev's word), you cut one head, 5 new emerges. There are always nice titles (Mario RPG, Zombie ate my neighbours, Lufia,...) but for me it's getting too much now. Might change again (dunno how often I retired), but right now, I simply don't have the time anymore.

Regarding your questions: This is a very good guide you may want to work through:
https://www.smwcentral.net/?p=section&a=details&id=14268
I once made a simple asm teaching tutorial:
https://www.zeldix.net/t134-coding-for-absolute-beginners
MSU stuff:
http://helmet.kafuka.org/msu1.htm
SPC stuff:
https://www.smwcentral.net/?p=viewthread&t=38116

Much luck Wink

Hey, Thank you so much for the links, I will start reading them asap :-), I hope your projects go well for you, and that you can squeeze in a break somehow. all work and no play makes for a dull day lol. Real quick qusten for you. on bsnes can you write in the breakpoint 2004, then 0000 and then check the x hook box to make a break point, or will that not work?
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Conn Sat 28 Jul 2018 - 20:28

If the register 2004 is activated by a msu code, then w breakpoint works. No need to edit the 0000
Conn
Conn

Program Counters mean anything for msu Image212

Since : 2013-06-30

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Polargames Sat 28 Jul 2018 - 20:37

Conn wrote:If the register 2004 is activated by a msu code, then w breakpoint works. No need to edit the  0000

Ok,Sweet thank you for your answer Conn Very Happy
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by DarkShock Mon 30 Jul 2018 - 8:37

Program Counter is a internal register of any CPU that contains the address of the next instruction to be executed. When you do a JSR/JSL type instruction, the PC gets pushed to the stack and RTS/RTL pop that address back into the PC.
DarkShock
DarkShock

Program Counters mean anything for msu Image111

Since : 2014-12-29

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Polargames Mon 30 Jul 2018 - 12:40

DarkShock wrote:Program Counter is a internal register of any CPU that contains the address of the next instruction to be executed. When you do a JSR/JSL type instruction, the PC gets pushed to the stack and RTS/RTL pop that address back into the PC.

Wow, I did not know that, actualy you had gave a better description then than the doc that I had read that was made back in 1998 lol. Now when it comes to the SPC its the push and pull method? Like x gets pushed to y, Or y pulls x. If I had understand it right?
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by DarkShock Mon 30 Jul 2018 - 13:48

You mean push and pop ? They just push the value to the stack. Pushing the value to the stack means writing to the address in the SP (Stack Pointer) register and then decrement it (at least on 6502-like architectures). Pop just read the value at SP address and increment (again on 6502-like architectures)

If you know C++ you can look at my CPU implementations of the SPC700 and NES 2A03/6502 here

SPC700: https://github.com/mlarouche/LegacySPC/blob/master/src/liblegacyspc/processor.cpp

NES 2A03/6502: https://github.com/mlarouche/sukiNES/blob/master/libsukiNES/cpu.cpp


Last edited by DarkShock on Mon 30 Jul 2018 - 14:07; edited 1 time in total
DarkShock
DarkShock

Program Counters mean anything for msu Image111

Since : 2014-12-29

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Polargames Mon 30 Jul 2018 - 14:07

DarkShock wrote:You mean push and pop ? They just push the value to the stack. Pushing the value to the stack means writing to the address in the SP (Stack Pointer) register and then decrement it (at least on 6502-like architectures). Pop just read the value at SP address and increment (again on 6502-like architectures)

If you know C++ you can look at my CPU implementations of the SPC700 and NES 2A03/6502 here

SPC700: https://github.com/mlarouche/LegacySPC/blob/master/src/liblegacyspc/processor.cp

NES 2A03/6502: https://github.com/mlarouche/sukiNES/blob/master/libsukiNES/cpu.cpp

Push pop, Yes that is what I had ment. I got mixed up from all of the info I have been reading on. Sorry about that. O and your link for SPC700 gives a 404 error code just to let you know.
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by DarkShock Mon 30 Jul 2018 - 14:08

Updated the link!
DarkShock
DarkShock

Program Counters mean anything for msu Image111

Since : 2014-12-29

Back to top Go down

Program Counters mean anything for msu Empty Re: Program Counters mean anything for msu

Post by Polargames Mon 30 Jul 2018 - 14:27

DarkShock wrote:Updated the link!

Sweet, Thank you very much, I will be sure to take a look into this. Very Happy
Polargames
Polargames

Program Counters mean anything for msu Image112

Since : 2018-06-06

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum