Jump to content
IGNORED

AdvSkelVic65 problem w/ scrolling on Atari8 cartridge


Recommended Posts

Hi!  Over the past few days, I've been debugging and optimizing my AdvSkelVic65 program.  Now, it has a version for an 8k or 16k Atari8 cartridge, and a 32k version is planned.  Currently, the Atari cartridge version has an issue with scrolling: at first, the screen moves slightly, then the screen clears.  You can find the program at c65 additions - Manage /game at SourceForge.net.  It uses AtaSimpleIO for the Atari version.

Link to comment
Share on other sites

4 hours ago, Harry Potter said:

Hi!  Over the past few days, I've been debugging and optimizing my AdvSkelVic65 program.  Now, it has a version for an 8k or 16k Atari8 cartridge, and a 32k version is planned.  Currently, the Atari cartridge version has an issue with scrolling: at first, the screen moves slightly, then the screen clears.  You can find the program at c65 additions - Manage /game at SourceForge.net.  It uses AtaSimpleIO for the Atari version.

You programmed this right?

 

 

Also, if you are changing the pointers to the display list maybe you are changing the high byte instead of the low byte. I'm not 100% though.

Link to comment
Share on other sites

5 hours ago, Harry Potter said:

AFAIK, neither AtaSimpleIO nor the text adventure code uses the display list.  AtaSimpleIO accesses the ROM print function, though.

Certain vectors in the OS ROM are not supported, and changed between the various iterations of the OS.  This could be a case of using a function whose location changed between the 400/800 and XL OS ROMs.

Link to comment
Share on other sites

47 minutes ago, Wrathchild said:

I wish you'd learn to diagnose these things yourself.

👍 That's part of the fun :) 

 

@Harry Potter

I'm no expert using Altirra debugger, but I can trace programs and monitor memory etc. It's just so powerful, 

just get to learn how to do it, it's worth taking some time out and playing with it.

 

Link to comment
Share on other sites

1 hour ago, Harry Potter said:

How do I print to the screen in a reliable way?

That's not a question with a straight forward answer as so much context is missing.

 

"LDA #value / STA someByteInScreenMem"  is a legitimate answer, e.g. if you control the screen.

 

If you want to use the "S:" device, are you assuming it's already open (via the OS) or will you close and open it yourself?

 

We repeatedly point you at tomes such as De Re Atari and Mapping the Atari, and there will be many articles in the likes or Page 6, Antic, Analog magazines...

Please take the time and effort to do homework before asking people to do it for you.

Link to comment
Share on other sites

2 hours ago, Ecernosoft said:

You can also have a pointer to where your “cursor” is in screen memory so you can write to the pointer, move the pointer, and continue as normal.

Just have to remember that "putting" bytes directly to screen will require some conversion from ASCII characters, I did something like this

in a disk copy utility where I put the current sector number on screen.

 

Not the most elegant code, but I did write this in the 80's, but it works.

Takes the current sector number from DAUX1 and DAUX2

using known FP calls in ROM to convert the number to INT then ASCII.

move the result to a buffer while converting from ASCII, as it's always numbers, just subtract $20.

The put to screen at the known location.

 

LOOP200  LDA DAUX1
         STA $D4
         LDA DAUX2
         STA $D5
         JSR $D9AA    ; INT to FP
         JSR $D8E6      ; FP to ASCII
         LDA #0
         LDX #6
XXX      STA BUFFER2,X
         DEX 
         BNE XXX
         LDY #0
         LDX #0
L500     LDA ($F3),Y     ; pointer to ASCII text from FP
         BMI BUFOUT
         SEC 
         SBC #$20
         STA BUFFER2,X
         INY 
         INX 
         JMP L500
BUFOUT   AND #$7F
         SEC 
         SBC #$20
         STA BUFFER2,X
         LDX #0
         LDY #22
LOP      LDA BUFFER2,X
         STA ($58),Y     ; points to start of screen + Y register
         INY 
         INX 
         CPY #26
         BNE LOP

  • Like 1
Link to comment
Share on other sites

4 hours ago, TGB1718 said:

As your using cc65, why not use include conio.h

then use the function gotoxy(x,y) to place the cursor where you want to print. 

Just a noob question: What is a .h file? Just asking. Not like I'm going to use CC65 though. And if I ever did I'd just use 8bitworkshop's built in CC65.

Link to comment
Share on other sites

C uses header files where you put things like function prototypes/definitions etc.

It saves having everything in your main code

 

for example if you put this at the top of your program, it will give you access to all

the standard functions defined in the header file, the actual code for those functions

are in libraries which are linked in during compilation

 

#include <stdio.h>

 

int main(void)

{

code goes here

}

 

There are loads of libraries that come with C

 

In my response to Harry, you use the header conio.h which defines the function gotoxy(x,y)

Edited by TGB1718
  • Like 1
Link to comment
Share on other sites

23 hours ago, Wrathchild said:

We repeatedly point you at tomes such as De Re Atari and Mapping the Atari, and there will be many articles in the likes or Page 6, Antic, Analog magazines...

Please take the time and effort to do homework before asking people to do it for you.

Why would he do that when we always wind up doing it for him? Besides, he really just wants a little attention I think.

  • Thanks 1
Link to comment
Share on other sites

I know, I'm suckered in, but decided to do this just for fun.

 

@Harry Potter attached is some MADS source, have a look, it's only a demo, but the code that does the business is small

and could easily be improved on. Easy to include into a cc65 program as assembler routines.

 

Bear in mind though MADS is nice in that if you put ASCII strings in double quotes it produces the string in Atari Screen format

not ASCII.  

scratch.xex scratch.asm

Link to comment
Share on other sites

18 hours ago, Ecernosoft said:

Just a noob question: What is a .h file? Just asking. Not like I'm going to use CC65 though. And if I ever did I'd just use 8bitworkshop's built in CC65.

A .h file is a 'specification' file for the C language, also known as a 'header' file. You put definitions of things in there so that other modules can see/call them. So, for instance, a foobar.h file might have:

void foo(int bar);

in it. Then, if another C language file includes that .h file, it can see and call the foo() function. Note that there must be a matching foobar.c file with a matching function 'body':

void foo(int bar)

{

  //some code....

}

 

The 'body' is signified by the open and close braces and the code between them. This is called separation of specification (.h) and implementation (.c).

  • Like 1
Link to comment
Share on other sites

3 minutes ago, TGB1718 said:

I know, I'm suckered in, but decided to do this just for fun.

 

@Harry Potter attached is some MADS source, have a look, it's only a demo, but the code that does the business is small

and could easily be improved on. Easy to include into a cc65 program as assembler routines.

 

Bear in mind though MADS is nice in that if you put ASCII strings in double quotes it produces the string in Atari Screen format

not ASCII.  

scratch.xex 274 B · 0 downloads scratch.asm 2.32 kB · 0 downloads

Yep, doesn't hurt, could provide anybody some info, so why not. It gets old though in OP's case.

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