Jump to content
IGNORED

Expanding from 24 to 25 GRAPHICS 0 text lines?


Recommended Posts

I want to expand the number of displayed (Atari BASIC) GRAPHICS 0 text lines from the default value 24 to 25. Screen size 40 x 25 suits my needs better than 40 x 24.

 

The default display list looks like this expressed using decimal notation:

 

112, 112, 112, 66, 64, 156, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,65, 32, 156

 

I guess I can remove one of the 112s and add an extra 2, like this, to get my 40 x 25 text mode:

112, 112, 66, 64, 156, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,65, 32, 156

Is this the best way of doing it without violating any PAL/NTSC/whatever compatibility? My understanding is the worst thing that can happen is that on old TVs with rounded corners, the border of the 40 x 25 area may look a little rounded.

Is there any preferred alternative to the modification I suggested above? For example, is it for any reason better to keep the three 112s and add an extra line at the bottom?

BR, Anders
Link to comment
Share on other sites

Your modification will not work as there is not enough space for 40x25 screen... the last line will wrap around 4k ANTIC limit and will display data from address $9000 (default video RAM is $9c40 - $9fff). You would need move display list somewhere else or at least 40 bytes lower in memory if it's free, changing DLIST pointers, change pointers in display list itself (pointer to the video ram and pointer at the end to the dlist beginning). And when doing this you can center the screen vertically by changing one of the 112 to 48 (4 scanlines instead of 8 ) and ADDING one 2 into display list.

Edited by MaPa
Link to comment
Share on other sites

The other problem is that E: and S: won't support the extra line. You have to use other means to write to it.

Somewhat sad, they could have put some extra effort into the OS to support variable sized displays but as it turns out only 4 or 24 lines are supported.

 

If you want to make the program work on XL & later OS only then you could use Graphics 12 then modify the display list such that the 1st 24 lines comes from the main window and the 25th comes from the first line of the text window (change occurrences of Antic mode 4 to mode 2 in the process)

 

Easier way is probably to just adjust the screen pointer the OS uses (dec locations 88/89) by 40. The disadvantage could be turned to advantage, e.g. the extra line can be protected from scrolling or clear-screen, either put it top, bottom, wherever, dependant on your needs.

Link to comment
Share on other sites

...
Easier way is probably to just adjust the screen pointer the OS uses (dec locations 88/89) by 40. The disadvantage could be turned to advantage, e.g. the extra line can be protected from scrolling or clear-screen, either put it top, bottom, wherever, dependant on your needs.

Exact this is, what I wanted to add, when I first read the topic. Simple trick, but you can write to every line on an expanded DL with normal BASIC instructions.

Edited by pps
Link to comment
Share on other sites

Hello Quadrunner and Dragonstomper,

Thanks for replying so quickly and I am sorry, I described too little of the context of my need for this.

 

This is for a machine code program to fit on a 16 KB RAM Atari. I currently have 40 x 24 = 960 bytes of screen memory in the address range to 15424. Below that, from 15392 to 15423 the 32 bytes long display list.

I understand if I expand the screen to 40 x 25 it will be 1000 bytes and then it would be allocated to address interval 15384 to 16383. The display list on 15352 to 15383 would then need to modified to generate one less of the blank lines and one more of text lines, according to the original posted data.

 

However my concern is, will it with regard to PAL/NTSC/whatever compatibility be OK to remove one of the 112s and add a 2? That I think expands the text screen at the top. Is it otherwise OK to add one at the end of the text screen? This could be considered from a basic compatibility point of view, but also as an aestetical issue. Will it work on all markets and does it look good?

 

Again, I apologize for referring to Atari BASIC without clarifying I just meant the ANTIC mode, not the Atari BASIC environment itself.

BR, Anders

Link to comment
Share on other sites

Quadrunner... etc... they are the post rankings, user names are in bold above the av picture.

 

Actually, if you insert an extra mode 2 line, to keep the display centred you should retain a blank instruction but make it for 4 lines instead of 8 (ie change 112 to 48)

 

It's an often discussed thing but generally it should be safe to use equivalent to 27-28 lines in NTSC, PAL will usually be good for 29-30 (assuming here you do centring corrections)

 

Since you're modifying to such an extent, you're best off just constructing the DList from scratch since that extra line will wipe the default one anyway.

Also remember the default screen location will vary dependant on how much Ram, if a cart is present etc. so don't count on the OS putting it where you think it'll be.

But you can change RAMTOP to force the OS to allocate a screen where you want it (dec. 106) - normally points to first address that isn't RAM.

To force a screen always to behave as if 16K is installed, POKE 106,64 before opening the screen.

Link to comment
Share on other sites

Hello Rybags,

 

OK, so I confused rankings with names.

 

I thought I should use what I call the default display list and modify it in a coordinated way to be sure I preserve the dimensions of the screen, which in turn is because I wanted to write an all screen compatible program.

 

However after reading comments from yourself and from MaPa, I understand I need not add 8 and subtract 8 from the net screen dimension, I can add 8 and subtract 4 to keep it centerred vertically.

 

Your advice has been of great help and I will share the result here later, if I ever finish this mini project.

 

BR, Anders

Link to comment
Share on other sites

25 text lines (200 scan lines) is not a big deal from a display standard point of view. ANTIC is already generating 216 scan lines for the graphics modes created by the OS. Those three $70 instructions generate 8 blank scan lines each (24 scan lines total, so 192 + 24 == 216). These instructions don't have to be only blank line instructions. They could be graphics mode instructions instead. Antic can generate up to 240 scan lines of graphics. Whether or not the extra graphics lines are visible depends on the monitor/TV used.

 

The Atari OS conservatively sets up 192 scan lines worth of graphics instructions positioned by the leading blank lines, because that's what fit on the widest selection of TV screens; old console TVs being the worst examples -- sometimes even the horizontal width could be crowded by the TV bezel, which is why the screen editor starts by default with the left margin indented 2 characters. I had a decent 13" color TV back in the day and it could easily fit 28 lines of text (224 scan lines of graphics).

Link to comment
Share on other sites

Hello kenjennings,

 

Thanks for this clarification, in particular about the horizontal indent, I always wondered why it was like that on the Atari.

 

I am very much retro in my thinking, trying to do things in a way that take into account technical conditions and criteria given by yesterday's TV/monitor standards. I have no purpose other than perception and feel, want it to be really old style.

 

BR, Anders

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