Previous Thread
Next Thread
Print Thread
Page 331 of 331 1 2 329 330 331
Re: TMS-09xx/1xxx thread (was New Dumps) [Re: seanriddle] #115903 09/12/19 05:13 AM
Joined: Aug 2019
Posts: 12
N
notknown Offline
Member
Offline
Member
N
Joined: Aug 2019
Posts: 12
Sorry for the double post but crazyc, I edited your script and got it to work 100%! Alarms work too.
Code
[{
	"desc": "Set clock to current time",
	"space": {
		"cpu": {
			"tag": ":maincpu",
			"type": "data"
		}
	},
	"script": {
		"run": "local lt = os.date('*t') cpu:write_u8(16, lt.min % 10) cpu:write_u8(17, lt.min // 10) local hour = (lt.hour > 12) and (lt.hour - 12) or lt.hour if lt.hour == 0 then hour = 12 end cpu:write_u8(18, hour % 10) cpu:write_u8(19, (hour // 10+12) + (((lt.hour > 12) or (lt.hour == 12)) and -10 or 20))"
	}
}]



Edit: the alarm is still finicky but it kinda works?? Seconds might have to be secretly synced as well for it to go off properly.

Last edited by notknown; 09/12/19 05:19 AM.
Re: TMS-09xx/1xxx thread (was New Dumps) [Re: seanriddle] #115904 09/12/19 05:27 AM
Joined: May 2004
Posts: 1,592
H
Haze Offline
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,592
if you're forcing the value every frame then it probably won't go off as the game likely checks the time vs alarm when it ticks over internally, which you'd be preventing from happening.

really you want to set it to current system time at startup and leave it.

remember, forcing the system time into memory like this is a hack, it's going to cause abnormal behavior, it isn't how the machine worked, the original machine was 'always on' and once the time was set, would just increment it every 'frame' this cheat is a convenience feature only to work around the fact that with MAME as soon as you quit you turning the machine off, which in reality you never really do.


Re: TMS-09xx/1xxx thread (was New Dumps) [Re: Haze] #115905 09/12/19 07:09 AM
Joined: Aug 2019
Posts: 12
N
notknown Offline
Member
Offline
Member
N
Joined: Aug 2019
Posts: 12
I figured the reason why it was doing that is because the second timer is going from minute to minute is what checks the time and then checks whether to set the alarm, and it's true because if I hold down fast forward, the alarm will go off multiple times because of the internal timer reaching 60 or 0 or whatever.


I'm glad that it's working correctly now, Thank you so much for the wonderful script. I also edited it and got it to work with the registries in super mario bros!

We could try to make a zip of the cheats for each game I suppose

Code
[{
	"desc": "Set clock to current time",
	"space": {
		"cpu": {
			"tag": ":maincpu",
			"type": "data"
		}
	},
	"script": {
		"run": "local lt = os.date('*t') local sec = lt.sec+1 if sec>=60 then sec=sec-60 end if sec >0 and sec<59 then cpu:write_u8(38,sec // 10) cpu:write_u8(39,sec % 10) end cpu:write_u8(37, lt.min % 10) cpu:write_u8(36, lt.min // 10) local hour = (lt.hour > 12) and (lt.hour - 12) or lt.hour if lt.hour == 0 then hour = 12 end cpu:write_u8(35, hour % 10) cpu:write_u8(34, (hour // 10+12) + (((lt.hour > 12) or (lt.hour == 12)) and -10 or 20))"
	}
}]


Edit: I made an edit to incorporate seconds to trigger the alarm. it syncs seconds besides the between 59 to 0 to activate the trigger for the alarm. Works pretty well.

I get what you mean by having the sync script just run on startup to minimize issues. I do think it could be fixable by having a variable that keeps track of a minute change and syncs each starting second back to 0 when the system clock starts at 0 seconds. If you think it would cause gameplay behavior to change I can test it out. Messing around with values in the registry suggest that a lot of timed events during gameplay have their own timers not correlated to the clock, and even if it was, it would probably be using the timer that counts seconds, not the seconds, minutes, or hours themselves. Maybe if these values influence pseudo random generation then maybe, otherwise maybe not.



By the way, What's a good way to read the hex registries in mame when running a game for debugging?

Last edited by notknown; 09/12/19 09:57 AM.
Re: TMS-09xx/1xxx thread (was New Dumps) [Re: seanriddle] #115906 09/12/19 11:42 AM
Joined: Mar 2001
Posts: 16,300
R
R. Belmont Online Content
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,300
"hex registries"?

Re: TMS-09xx/1xxx thread (was New Dumps) [Re: R. Belmont] #115907 09/12/19 08:15 PM
Joined: Aug 2019
Posts: 12
N
notknown Offline
Member
Offline
Member
N
Joined: Aug 2019
Posts: 12
Originally Posted by R. Belmont
"hex registries"?


The raw memory laid out as hexadecimals per byte.

Like FCUEX's live hex editor.
[Linked Image from fceux.com]

To help find which addresses in the memory store time in each game, and maybe some other debug stuff.
The only way I could find SMB's time addresses was by blanket searching and editing addresses until the time was affected.

Luckily G&W has such small RAM it's easy to try to locate, but it would be easier to be able to observe the memory while the rom was running.

Last edited by notknown; 09/12/19 08:17 PM.
Re: TMS-09xx/1xxx thread (was New Dumps) [Re: seanriddle] #115908 09/12/19 08:35 PM
Joined: Jan 2012
Posts: 804
C
crazyc Offline
Senior Member
Offline
Senior Member
C
Joined: Jan 2012
Posts: 804
Run mame with -debug and you'll get a debug window. From from Debug menu you can open a memory window. Select data space from the drop down to see the mcu work ram address space.

Re: TMS-09xx/1xxx thread (was New Dumps) [Re: crazyc] #115910 09/13/19 07:42 AM
Joined: Aug 2019
Posts: 12
N
notknown Offline
Member
Offline
Member
N
Joined: Aug 2019
Posts: 12
Originally Posted by crazyc
Run mame with -debug and you'll get a debug window. From from Debug menu you can open a memory window. Select data space from the drop down to see the mcu work ram address space.


Thank you. Got the script to work on Bombsweeper as well. Was fun messing around and seeing how SMB worked as well.

Re: TMS-09xx/1xxx thread (was New Dumps) [Re: seanriddle] #115919 09/15/19 10:11 AM
Joined: Jul 2018
Posts: 91
H
hal3000 Offline
Member
Offline
Member
H
Joined: Jul 2018
Posts: 91
G&W Judge has now been preserved in MAME smile

The dump has been done from the first (green) issue of the game which contains a game scoring issue which was fixed in a later (purple) version of the game. As the other early games, this game is based on the SM5A.

This is a screenshot from the game:
[Linked Image from i.imgur.com]

Thanks to Mr. Do for providing the game and Sean for shipping the game to me and scanning inlays and pcb!

Re: TMS-09xx/1xxx thread (was New Dumps) [Re: seanriddle] #115929 09/15/19 09:17 PM
Joined: Jan 2019
Posts: 49
H
hydef Offline
Member
Offline
Member
H
Joined: Jan 2019
Posts: 49
Added Judge and changed tons of games. Mainly remade all of the Wide Screen games

[Linked Image from ]

Thanks for the info about the bubbles and stuff, sorry I haven't been replying to it all, I've been trying to make loads of adjustments. I added bubbles to more games than you said, like Chef and Popeye because I saw them on some pictures but if no one likes them, just override them with some blank pngs.

Page 331 of 331 1 2 329 330 331

Who's Online Now
2 registered members (Edstrom, rfka01), 154 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,683
Posts114,012
Members4,863
Most Online510
Aug 26th, 2019
Powered by UBB.threads™ PHP Forum Software 7.7.3