Jump to content



0

Unresulved Symbol mul8


5 replies to this topic

#1 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • 504 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Fri Feb 15, 2008 9:52 AM

When i try to compile my game i get the following error:

Quote

---------- Capture Output ----------
> "C:\Atari2600\bB\2600bas.bat" C:\Projects\Atari\OpenSourcePong\opensourcepong.bas
2600 Basic compilation complete.
DASM V2.20.07, Macro Assembler ©1988-2003
bytes of ROM space left
2643 bytes of ROM space left
2643 bytes of ROM space left
--- Unresolved Symbol List
mul8 0000 ???? (R )

Fatal assembly error: Source is not resolvable.

> Terminated with exit code 0.

Code:
 rem Open Source Pong
 rem an Open Source Pong Remake
 rem Updated: Feburary 10, 2008
 rem Website: http://opensourcepong.freepgs.com

 rem set the rom size
 set romsize 4k
 
 rem set kernel options
 rem readpaddle - set it so the paddle controlers are read
 set kernel_options no_blank_lines readpaddle
 
 rem set an alias for the ball's x velocity
 dim ballxvelocity = a
 
 rem set an alias for the ball's y velocity
 dim ballyvelocity = b
 
 rem set an alias for the player1's score
 dim player1score = c
 
 rem set an alias for the player2's x score
 dim player2score = d
 
 rem set player1's inital x positon
 player0x = 15
 
 rem set player1's inital y positon
 player0y = 45
 
 rem set player2's inital x positon
 player1x = 140
 
 rem set player2's inital y positon
 player1y = 45
 
 rem set ball's inital x positon
 ballx = 80
 
 rem set ball's inital y positon
 bally = 45
 
 rem start of the game loop
gameLoop

 rem color the background black'
 COLUBK = 0

 rem set the color of the playfield to white
 COLUPF = 14
 
 rem define the playfield
 playfield:
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 ................................
 ................................
 ................................
 ................................
 ................................
 ................................
 ................................
 ................................
 ................................
 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
 
 rem color player 1's paddle
 COLUP0 = 14
 rem define player 1's sprite
 player0:
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
end

 rem color player 2's paddle
 COLUP1 = 14
 rem define player 2's sprite
 player1:
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
 %00011000
end

 rem read paddle 0, use it to position player0x across the screen
 currentpaddle = 0

 rem draw the game screen
 drawscreen

 rem set player1's y position to the paddle control's axis
 rem multiplied by 2 plus 1
 rem player0y = 2 * paddle + 1
 
 rem make sure the player doesn't go off the top screen
 if player0y > 153 then player0y = 153

 rem make sure the player doesn't go off the bottom screen
 if player0y < 8 then player0y = 8
 
 rem redraw the screen
 drawscreen
 
 goto gameLoop

To test it remove the rem from the following statement:
 player0y = 2 * paddle + 1

Thanks,

Open Source Pong

Edited by Space Xscape, Fri Feb 15, 2008 10:00 AM.


#2 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Fri Feb 15, 2008 10:05 AM

View PostSpace Xscape, on Fri Feb 15, 2008 10:52 AM, said:

--- Unresolved Symbol List
mul8 0000 ???? (R )
"mul8" is used in the multiplication. If you get an error because it wasn't found (i.e., "unresolved symbol"), then you need to add the following line to your program:

   include div_mul.asm
Michael

#3 Robert M OFFLINE  

Robert M

    Stargunner

  • 1,481 posts
  • Rootbeer!
  • Location:Western NY state

Posted Fri Feb 15, 2008 10:05 AM

Try:


paddle * 2 + 1

#4 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • 504 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Fri Feb 15, 2008 10:16 AM

View PostRobert M, on Fri Feb 15, 2008 11:05 AM, said:

Try:


paddle * 2 + 1

That worked thanks

#5 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Fri Feb 15, 2008 1:29 PM

View PostSpace Xscape, on Fri Feb 15, 2008 11:16 AM, said:

View PostRobert M, on Fri Feb 15, 2008 11:05 AM, said:

Try:


paddle * 2 + 1

That worked thanks
In this case it works, because it's "* 2," and multiplication by 2 doesn't require either the div_mul.asm or div_mul16.asm includes. But from a more general standpoint, if you get a compile error that lists "mul8" as an unresolved symbol, then you need to add "include div_mul.asm" to your program. :)

Michael

#6 Primordial Ooze OFFLINE  

Primordial Ooze

    Dragonstomper

  • 504 posts
  • Quacker Blaster Lead Programmer
  • Location:United States of America

Posted Fri Feb 15, 2008 1:33 PM

Cool, it's good to know this, Thanks.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users