Jump to content


Photo

Free space and code optimisation in "JSW"


111 replies to this topic

#111 IRF

IRF

    Advanced Member

  • Contributor
  • 2,578 posts

Posted 21 June 2017 - 07:20 PM

The three byte command at #959A is unnecessary; if the program arrives there, then A already holds the number of the current room from #8420, having been assigned it by the identical command at #9534.



#112 IRF

IRF

    Advanced Member

  • Contributor
  • 2,578 posts

Posted 07 August 2017 - 09:43 AM

I believe that in a game with fewer than 256 collectable items, it would be possible to use the spare range of addresses at the top of pages #A4 and #A5 for other purposes.

 

However, extreme care would need to be taken if subsequent editing of the item definition bytes is carried out - individual entries would need to be edited in the hex editor.  If items are deleted in the JSWED GUI, then all other entries above in the item tables are shunted down, which would mean any Patch Vector subroutines would be brittle.  A 'safer' use of the spare addresses at #A4xx / #A5xx would be for data such as graphics, or an in-game tune.

 

(I resisted the temptation to use the spare bytes in this range when working on 'Jet Set Mini'.)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users