Jump to content
Gemintronic

Upp Plus Plus Dev Notes

Recommended Posts

Recently I up (ha!) dated Upp to Upp Plus Plus. Old version here:

 


 

New game ROM is here: https://theloon.itch.io/upp


 

Thought it might be useful to highlight some of the changes.  My code isn't the best solution: just the best that works for me.  Hopefully others can find my experience of some use crafting their own improved technique - or, at least avoid my bad habits   I want to make it very clear I am not pointing out flaws in batari BASIC, Stella or mini kernel developers.  The faults presented here are in my abuse, unintended usage of features and misunderstanding of coding in general.


 

I expanded the ROM from 4k to 32k to fit in more levels.  This revealed a booboo in my placement of "include div_mul.asm".


 

While this works in 4k:

 set kernel_options player1colors pfcolors pfheights
 set romsize 4k

 include div_mul.asm


 

Only putting div_mul.asm at the very, very very top works for 32k:

 include div_mul.asm

 set kernel_options pfcolors pfheights
 set romsize 32k


 

Also, any inline asm seems to work best in the actual bank you use it in. So, since I use SeaGtGruffs pfhscroll in the main game loop in bank one I made sure it was the last thing before bank 2.

inline pfhscroll.asm

bank 2

 

For the extra hand-crafted levels I made sure to keep the individual level labels very short to avoid problems compiling very long lines of code. Also, keep the number of level labels to 32 just in case there are issues with on .. goto or on .. gosub labels over 40.

loadlevelstatic

tempvar = rand&31

on tempvar goto l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16 l17 l18 l19 l20 l21 l22 l23 l24 l25 l26 l27 l28 l29 l30 l31 l32

 

In order to avoid triggering paddle auto-detection in Stella I redacted any seemingly paddle related code in std_kernel.asm. Also, renamed any labels in paddlemini.asm to something other than “paddle” (although this shouldn’t actually be a factor.) Not including the modified binaries as I probably scwewed something up unintentionally with my oblivious modifications.

 

Adding Genesis controller support was far easier than I thought thanks to RevEng.

 

Used up a variable for genesispad

dim genesispad = z

 

I added this code just after my constants section:

genesisdetect

rem Detect if a genesis pad is plugged in...

rem We only run this once, at the start of the program.

genesispad=genesispad & $fe

if INPT1{7} then genesispad=genesispad | 1

 

In the input section of code I put the button C code in. Also, its substitute for normal joysticks:

if joy0down then if player1y < 78 then player1y = player1y + 1 : goto after_down

if genesispad{0} && !INPT1{7} then if player1y < 78 then player1y = player1y + 1

after_down

 

Only other update to techniques used was to use my constants for colors. If I ever wanted to go PAL60 it’s as easy as swapping out the NTSC constants for PAL ones.

rem //** NTSC Colors **//

const _orange = $3A

const _aqua = $B8

const _black = $00

const _blue = $86

const _dkgray = $F2

const _fuchsia = $58

const _gray = $08

const _green = $D8

const _dkgreen = $D6

const _lime = $DE

const _ltgray = $0A

const _maroon = $52

const _navy = $A4

const _olive = $E8

const _purple = $6C

const _dkpurple = $64

const _red = $44

const _silver = $0C

const _teal = $AA

const _white = $0E

const _yellow = $1E

const _brown = $F4

const _dkblue = $70

const _pink = $5E

const _skyblue = $AE

 

Hope some part of this was of use. Thanks for slogging through my self inflicted trials and tribulations! :)

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...