Users browsing this thread: 1 Guest(s)
Expanded palette hack

#8
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
interesting.  yep, that's suggesting to me that plain and Esper Terras aren't sharing (and thus overwriting) a dataset here.  and in that case, is it possible that the sprite/palette cache simply doesn't include Esper Terra?  can it be expanded to do so?

so i decided to optimize the patch code:
http://assassin17.brinkster.net/forum-po...s-opt1.asm

*nothing* relates specifically to the issue at-hand here; it's just general speed-up attempts.  and very little of the changes demonstrate any grasp of graphics, so it's hardly an overhaul -- just based on experience with 65816 asm, and looking for redundancies and other opportunities.

main things changed:
- dropping unnecessary "REP #$20"s and "SEP #$20"s and such.  Eggers tended to put these right after A LOT of labels, almost like he wanted to readily say what the CPU mode would be at key points just to retain his sanity (it's a giant patch, after all), but then never went back to cull them.
- i don't think he was aware of the TSB instruction.
- nor CPY/CPX and BIT. Tongue
- weird stuff where he'd do:
1. enter 8-bit A mode
2. do 16- or 32- bits worth of memory storages
3. switch back to 16-bit A mode.
:O
- converting JMPs to BRAs, admittedly some enabled by my previous optimizations shrinking branch distances.
- in no particular category, i did overhaul the "lbg_palette_check_fill_with_ones" loop nicely.

---------------

someone let me know whether that .asm file assembles and runs properly.  if so, does it speed anything up?

the website with the assembler Eggers uses is down, and i'd be too lazy to download and run it anyway.

EDIT: okay, found the author has another website:
http://www.obelisk.me.uk/6502/downloads.html

---------------

what i'm focused on going forward are two things in the section from "lbg_replace_done" to "lbg_done_replacement_colors":

1. as you can see, i'm mulling optimizations from "EOR / STA" to TSB and to TRB.  it looks like i put each of those in the right spot based off his comments, but based on his actual code (there and at "lbg_find_unused_color" and "lbg_find_expanded_color"), i think i've got the instructions switched.  thoughts?

2.
Code:
JMP lbg_find_unused_color_pre        ; Return to the beginning of the loop

i half-think he wanted to do "JMP lbg_find_unused_color" there, based on:
a. the nature of most loops (e.g. not re-initializing an index to its starting value)
b. the way he preserves X right before looping
c. how he never branches to "[label_name]_pre*" -titled labels from below.  they're for loop setups as opposed to loop contents, apparently.

if i'm right, changing this one line could save as much time as my other dozens of optimizations put together!

thus, more scrutiny on "lbg_calculate_replacement_colors" through "lbg_done_replacement_colors" would be much appreciated.
Quote  
[-] The following 4 users say Thank You to assassin for this post:
  • Gi Nattak (11-26-2019), SSJ Rick (12-02-2019), Turbotastic (11-28-2019), Warrax (11-26-2019)



Messages In This Thread
Expanded palette hack - by Eggers - 09-12-2014, 11:10 PM
RE: Expanded palette hack - by SSJ Rick - 09-15-2014, 09:55 PM
RE: Expanded palette hack - by Gi Nattak - 11-19-2019, 07:18 PM
RE: Expanded palette hack - by Odbarc - 11-24-2019, 11:45 PM
RE: Expanded palette hack - by ScarabEnigma - 11-24-2019, 11:48 PM
RE: Expanded palette hack - by Odbarc - 11-26-2019, 03:17 PM
RE: Expanded palette hack - by assassin - 11-26-2019, 12:01 AM
RE: Expanded palette hack - by Gi Nattak - 11-26-2019, 02:22 AM
RE: Expanded palette hack - by assassin - 11-26-2019, 02:44 AM
RE: Expanded palette hack - by assassin - 12-05-2019, 04:52 PM
RE: Expanded palette hack - by Gi Nattak - 11-26-2019, 11:33 AM
RE: Expanded palette hack - by assassin - 11-28-2019, 12:26 AM
RE: Expanded palette hack - by C-Dude - 11-29-2019, 12:53 PM
RE: Expanded palette hack - by assassin - 11-29-2019, 11:01 PM
RE: Expanded palette hack - by C-Dude - 11-30-2019, 12:23 AM
RE: Expanded palette hack - by Gi Nattak - 12-01-2019, 09:57 PM
RE: Expanded palette hack - by assassin - 12-02-2019, 02:55 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite