Jump to content
IGNORED

A Couple Questions: drawhiscore && Paddle Support


fultonbot

Recommended Posts

Hey guys, a couple simple questions:
 

1. While adding high score support, Atari Dev Studio / 7800 Basic dies on this line when compiling 

   drawhiscore attract

Any ideas why that might be?

 

2. I see that paddle support is not listed on the 7800 Basic Guide page.   Is this for new version?  Has it made it's way to Atari Dev Studio yet?

 

Note: Obviously, I'm seriously addicted to Atari Dev studio because it's so awesome.  

 

 

Link to comment
Share on other sites

14 minutes ago, fultonbot said:

Hey guys, a couple simple questions:
 

1. While adding high score support, Atari Dev Studio / 7800 Basic dies on this line when compiling 


   drawhiscore attract

Any ideas why that might be?

 

What compiler output messages do you get?

 

15 minutes ago, fultonbot said:

2. I see that paddle support is not listed on the 7800 Basic Guide page.   Is this for new version?  Has it made it's way to Atari Dev Studio yet?

 

Note: Obviously, I'm seriously addicted to Atari Dev studio because it's so awesome.

 

Likewise! ADS is pretty amazing.

 

Yes and yes - support was added in a recent release of 7800basic, and the latest version of ADS has the latest 7800basic release that supports paddles.

  • Like 1
Link to comment
Share on other sites

It might not recognise the command because it's only imported when a couple of conditions are met. Firstly you need to use the command "set hssupport $1234" replacing the number with a unique identifier of your choosing, secondly you need "incgraphic hiscorefont.png 320A". If you set hssupport without including a hiscorefont graphic it'll import the routines for loading and saving data but it'll leave out the stuff to show the high score tables.

Link to comment
Share on other sites

1 hour ago, Karl G said:

I've not used the hiscore functions yet, but looking at the source, the keyword it seems to be looking for is actually "drawhiscores", even though the documentation lists it as "drawhiscore". So, I would try it with "drawhiscores".

 

 

That seems to be it.  Of course, now I've run out of memory in bank 1, so I have to move some code around.  
Do you  think the whole high-score routine may need to live in its own bank?

 

[Edit]

Moved my own code to bank 7, but that doesn't seem to be the answer.   The high score include appears to take-up too much space:


 

5316 bytes of ROM space left in the main area of bank 1.
   7617 bytes of ROM space left in the main area of bank 7.
   8192 bytes of ROM space left in the main area of bank 8.
   hiscore assembly:  1725  bytes
     $4000 to $67ff used as zone memory, allowing 84 display objects per zone.
     -42 bytes left in the 7800basic reserved area.

 

 I guess I've run out of RAM, because the ROM seems fine in each bank. 
 Would it help maybe stuff that hiscore into a DMA hole?

 

[Edit]

So I moved my own arrays for game objects up into the extra memory starting at #6000, and reduced the DL memory accordingly, but i'm still getting -42 bytes.  I feel like I need to load the hiscore into the extra memory, or manage an other extensions into different parts of RAM.  Is there a way to do that?

 

[edit]

 

set hssupport appears to turn all of this other stuff on as well, which is only found if  I rem out hssupport, but keep the draw hiscores command in the code:

--- Unresolved Symbol List
DRIVINGBOOST             0000 ????         (R )
hscdrawscreen            0000 ????         (R )
PRECISIONMOUSING         0000 ????         (R )
DEBUGWAITCOLOR           0000 ????         (R )
MOUSETIME                0000 ????         (R )
PADDLESUPPORT            0000 ????         (R )
PADDLE1SUPPORT           0000 ????         (R )
FOURPADDLESUPPORT        0000 ????         (R )
TWOPADDLESUPPORT         0000 ????         (R )
PADDLE0SUPPORT           0000 ????         (R )
MOUSE1SUPPORT            0000 ????         (R )
MOUSE0SUPPORT            0000 ????         (R )
CANARYOFF                0000 ????         (R )
CANARRYOFF               0000 ????         (R )
MOUSEXONLY               0000 ????         (R )
PADDLESMOOTHINGOFF       0000 ????         (R )
PADDLESCALEX2            0000 ????         (R )
loaddifficultytable      0000 ????         (R )
PADDLERANGE              0000 ????         (R )

 

Some of these may be adding to the -45 bytes of RAM I would think.

Edited by fultonbot
Link to comment
Share on other sites

I don't know how much space it takes, but I'm guessing it's less than a full bank. I couldn't find it in any of the samples, I modified the "smasteroids" demo to use the high score code in case it helps anyone. The keyword is definitely "drawhiscores" and not "drawhiscore".

 

This will let the player play for 25 seconds, then record a high score, then start a new game with "fire".

 

smasteroidshs.zip

Link to comment
Share on other sites

1 hour ago, fultonbot said:

Moved my own code to bank 7, but that doesn't seem to be the answer.   The high score include appears to take-up too much space:

The manual has this to say about running out of space in the 4K reserved area. Maybe this will help with your issue:

 

https://www.randomterrain.com/7800basic.html#feature_modules

  • Like 1
Link to comment
Share on other sites

1 minute ago, Karl G said:

I don't know how much space it takes, but I'm guessing it's less than a full bank. I couldn't find it in any of the samples, I modified the "smasteroids" demo to use the high score code in case it helps anyone. The keyword is definitely "drawhiscores" and not "drawhiscore".

 

smasteroidshs.zip 35.88 kB · 1 download

We you able to load the code into a specific bank?  
It feels like it's RAM that isthe issue, not ROM.  Too many resident extensions.

Link to comment
Share on other sites

4 minutes ago, Karl G said:

The manual has this to say about running out of space in the 4K reserved area. Maybe this will help with your issue:

 

https://www.randomterrain.com/7800basic.html#feature_modules

I think that's the ticket!  Thanks!

 

[edit]

 

Bingo!  This appears to work.

 

bank 7
 inline hiscore.asm

 

But I guess don't understand how this relates to the free RAM as it's inserted into a ROM bank.     

 

Edited by fultonbot
Link to comment
Share on other sites

3 minutes ago, RevEng said:

The replies are fast and furious here. I've been beat to the punch twice, while formulating a reply. ?

 

 

I just figured I'd mention that high score code *isn't yet* supported with paddles, so there's no way presently to enter scores if paddles are used.

What if I only use the paddles in port #2, and force joystick into port #1?
Or better, add Mindlink support and we can just "think" the initials! :)

Link to comment
Share on other sites

19 minutes ago, fultonbot said:

But I guess don't understand how this relates to the free RAM as it's inserted into a ROM bank.     

It's not related to free ram. The 7800basic reserved area is ROM near the end of the cart, where all of the 7800basic boot and feature-enabling code lives.

Link to comment
Share on other sites

2 minutes ago, RevEng said:

It's not related to free ram. The 7800basic reserved area is ROM near the end of the cart, where all of the 7800basic boot and feature-enabling code lives.

Oh. Okay.  That makes sense.  I thought is was the 4K of RAM on board the 7800.  I guess the "4K" threw me.

So if I want to use the extra 16K RAM loaded by 128KRAM, I just store my vars up in that space right? As long as it's not where the extra DL memory is located?

Link to comment
Share on other sites

Sorry, more questions:

 

1. When using "set hsdifficultytext" I get this error during compile: 

 

Warning: Unable to open '7800hsgamediffnames.asm'

 

2. When should I display the high score screen within my other draw statements?  Not matter when I put the "drawhiscores attract" it appears to blast all my other drawing code, and even my event handlers for console buttons.

Link to comment
Share on other sites

1. what does your "set hsdifficultytext" statement look like fully? Either it needs to contain the "off" keyword, or a series of single-quoted difficulty names.

 

2. drawhiscore completely takes over the display. none of your stuff is supposed to display with it, because the display needs to be formatted in a very specific way. Worse, it will step on the display setup, so you should draw your screen from scratch. This is all in the guide.

 

[edit: just noticed the discussion about "drawhiscore" vs "drawhiscores". The next release will accept both.]

Link to comment
Share on other sites

6 minutes ago, SlidellMan said:

Agreed, it helps to proofread your manuals and tutorials.

It's a 55 page manual for a constantly-evolving development platform (technically even still in beta, I think). Things can and will get missed. As users, we can help a little by finding and reporting these issues when they arise.

  • Thanks 1
Link to comment
Share on other sites

51 minutes ago, SlidellMan said:

Agreed, it helps to proofread your manuals and tutorials.

I spend a lot of hobby time on 7800basic, including the manual entries. I do proofread, but for the same reason a writer needs an editor, I won't catch all of the mistakes. But thanks for the coaching.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

37 minutes ago, RevEng said:

I spend a lot of hobby time on 7800basic, including the manual entries. I do proofread, but for the same reason a writer needs an editor, I won't catch all of the mistakes. But thanks for the coaching.

Hey RevEng, just so you know, I appreciate EVERY WORD of any docs or tutorials you write, and I don't care if there are mistakes because I can come here and clear anything up, and, like you said it's an every evolving platform.  Thank you very very much for all the work you do.

 

I've actually authored 3 books on programming myself for O'reilly and FoE (back in 2010-2013).  The editing  process was grueling, and in the end, there were still mistakes in the text and code.  

Anyway, this was the  line of code

 

set hsdifficultytext 'Number Smashers' '' '' ''


Also, is there a patreon or any other way to makes sure you get a little something for all your effort?

Edited by fultonbot
  • Like 2
Link to comment
Share on other sites

For sure, and no need for patreon, though I do appreciate the gesture. ?

 

Your line looks mostly fine, and I ran it through a test which compiled on my end. The null strings should probably be just single-spaces for now, because 7800basic doesn't handle null difficulty names.

 

I *think* your warning might be harmless, and just due to my trying to delete any old '7800hsgamediffnames.asm' files from previous compiles. I don't actually get the same error, but I think it's from the OS, as that message isn't in my source code. Does it still make a working rom file?

 

[edit - scratch that. I think I recreated it. Try ensuring you "set hssupport $####" to enable hi score support, before any other hs directives.]

Link to comment
Share on other sites

44 minutes ago, RevEng said:

[edit - scratch that. I think I recreated it. Try ensuring you "set hssupport $####" to enable hi score support, before any other hs directives.]

That's it!!

So is the idea for the high score screen to be part of an "attract mode" since I can't program any way to leave the screen using input?  

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...