Users browsing this thread: 1 Guest(s)
Custom SwdTech Speed

#1
Posts: 735
Threads: 36
Thanks Received: 12
Thanks Given: 42
Joined: Jan 2016
Reputation: 6
Status
None
WARNING - Script may be unstable and cause gauge to work erratically. Am not sure why; help would be appreciated.

I'm aware of the SwdTech tweak patch that's out there, but it didn't work for me and in my search for another solution I found this thread, and can verify its fix works fine.

http://mnrogar.slickproductions.org/phpB...2919#p2247

This is a simple fix that even an idiot can do, and I say this as a certified idiot that did it.  Smile 

This fix uses up an empty line of coding at C1/FFF2.

Quote:C1/7D8A: 20 F2 FF

Relocates the SwdTech data to C1/FFF2 for the fix coding.

Quote:C1/FFF2: EE 82 7B
C1/FFF5: 48
C1/FFF6: AD 82 7B
C1/FFF9: 65 3A
C1/FFFB: 8D 82 7B
C1/FFFE: 68
C1/FFFF: 60


In that coding, the bolded 3A is the SwdTech speed - increase or decrease to your liking. Here's the gauge at 3A speed.



  Find
Quote  

#2
Posts: 21
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2016
Reputation: 0
Status
None
C1/7D84: A50E     LDA $0E                            Here it loads the RAM that points to the frame counter
C1/7D86: 2903     AND #$03                           Here it takes the number constant 3
C1/7D88: D003     BNE $7D8D                          it skips incrementing the Swdtech bar if the two are not related
C1/7D8A: EE827B   INC $7B82 (Cyan's Swdtech bar)     it increments the bar here
C1/7D8D: AD827B   LDA $7B82 (Cyan's Swdtech bar)     then it loads the swdtech bar and compares it with learned swdtechs


anyways, on the second page Master Zed says:
I have better.CODE: SELECT ALL

Code:
$C1/7D88 D0 03       BNE $03    [$7D8D]    ;??? branches to next opcode


Zero that branch value out. It certainly doesn't fly out of control, but it attains a speed that makes SwdTech charge times FAR less unbearable.



so this one byte code change increment the swdtech bar on every frame.

the version that was posted, it increments the bar every 4th frames.  Because he made it faster by other means:  JSR to C1/FFF2 and making the increment more than 1.

Then, they discovered another mistake; they messed it up on the first page.  Op code 65 refers to a direct page of the variable listed and they thought they were using constants.  This is why all the numbers fly all over the place in the posts.  Well, the final patch wound up increment the bar by $36 which is the number of swdtechs known.

So, here are ways to speed up the bar:
#1 $C1/7D88: D0 00 (always increment the bar every frame)
#2 $C1/7D86: 29 03 (try playing with this last byte info below)
#3 do the code you posted with C1/FFF9: 65 36  so the increment will be = number of known swdtechs
#4 do the code you posted with C1/FFF9: 69 XX  (play with the last byte and I think values between 01-31 are safe and you probably need to add an 18 (CLC) after that too.)
  Find
Quote  
[-] The following 1 user says Thank You to KnightDude for this post:
  • Warrax (09-08-2017)

#3
Posts: 21
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Jun 2016
Reputation: 0
Status
None
C1/7D86: 2903     AND #$03

00 is fastest 03 is normal 04+ is slower

Every number on the gauge is 32 increments and will completely fill and reset at 256.
so 00 will be 32/60fps = .53... seconds for each swdtech
01 is every 2nd frame; multiply by 2 64/60 = 1.06... seconds for each swdtech
02 is every 3rd frame; next swdtech = 1.6 seconds
03 is every 4th frame; next swdtech = 2.13... seconds
04 is every 5th frame; next swdtech = 2.66... seconds

For the larger increment level take the time (2.13...) and divide it by the increment level
2 = 1.06
3 = 0.71
4 = 0.53
5 = 0.42
6 = 0.35
7 = 0.30
8 = 0.26
...
31= .06 (4 frames)

Combine 00 speed in 7D86 and 31 increment in the coding fix and you'll get 1 frame per swdtech
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite