Jump to content



0

Math error


3 replies to this topic

#1 jbs30000 OFFLINE  

jbs30000

    Moonsweeper

  • 459 posts

Posted Sun Apr 20, 2008 3:17 AM

I remember from another thread that you sometimes have to sometimes do math a little differently....for example
Misc2=(player1y-24)/18
is giving me an error: div8 0000 ???? (R )
I tried going
Misc2=(player1y-24)/(9*2)
and
Misc2=(player1y-24)/(6*3)
But got the same error. So, how do I fix this? Thank you.

#2 jbs30000 OFFLINE  

jbs30000

    Moonsweeper

  • 459 posts

Posted Sun Apr 20, 2008 3:23 AM

Also, the game is multi-bank and include div_mul.asm doesn't work.

#3 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Sun Apr 20, 2008 10:49 AM

View Postjbs30000, on Sun Apr 20, 2008 5:23 AM, said:

Also, the game is multi-bank and include div_mul.asm doesn't work.
It looks like you need to specify the include file before the romsize, or it won't include the include file:

   include div_mul.asm
   set romsize 8kSC
An alternative would be to create a custom includesfile that includes div_mul.asm in it, which would also let you omit any unnecessary include files that you might not need-- e.g., pf_drawing.asm and pf_scrolling.asm:

; my_bankswitch.inc
;
; This is a customized version of the bankswitch.inc file.
;
2600basicheader.asm
bB.asm
std_kernel.asm
startup.asm
div_mul.asm
std_routines.asm
std_overscan.asm
bB2.asm
score_graphics.asm
banksw.asm
2600basicfooter.asm
Then, at the beginning of your program:

   includesfile my_bankswitch.inc
   set romsize 8kSC
Michael

#4 jbs30000 OFFLINE  

jbs30000

    Moonsweeper

  • 459 posts

Posted Sun Apr 20, 2008 11:08 AM

I put include div_mul.asm before set romsize, and it worked. Thank you very much.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users