Changing TEXT / HIRES display size?

The Oric video chip is not an easy beast to master, so any trick or method that allows to achieve nice visual results is welcome. Don't hesitate to comment (nicely) other people tricks and pictures :)
User avatar
Symoon
Archivist
Posts: 2145
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Changing TEXT / HIRES display size?

Post by Symoon »

Hi,

I'm struggling with TEXT/HIRES attibutes, so I'm requesting wizards help there.

What I'm trying to do is, in HIRES mode, having one two extra TEXT lines displayed at the bottom. That would mean reducing the HIRES screen by 16 lines as I would be replacing them by two TEXT lines.
I won't be using the TEXT lines, my goal is actually to have 14 lines not displayed (16 Hires - 2 Text lines), so I can use them as data storage without displaying garbage on screen.

Do you think it can be done? I've been trying again and again but each time I think I understood the way it works, I ended up with strange displays exactly where I don't want :-D

Thanks!
User avatar
Dbug
Site Admin
Posts: 4092
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Changing TEXT / HIRES display size?

Post by Dbug »

Not sure that works 100%, but here is an attempt:
image_2022-08-06_134923756.png
image_2022-08-06_134923756.png (8.53 KiB) Viewed 149 times

Code: Select all

10 PAPER 0:INK 3:HIRES
20 PRINT"LINE1":PRINT"LINE2":PRINT"LINE3";

50 POKE #A000+40*184,26      ' TEXT

100 FOR J=0 TO 1:FOR I=0 TO 40
110 POKE #BB80+40*(23+J)+I,16+1+(I AND 3)+J  ' Some patterns in TEXT
120 NEXT I:NEXT J

200 POKE #BB80+40*25,31       ' HIRES

305 CURSET 120,100,3
310 FOR I=1 TO 99 STEP 25   ' Draw some circles
320   CIRCLE I,2
330 NEXT I

400 FOR I=1 TO 40*14
410 POKE #A000+40*184+I,42    ' Fill with some stuff
420 NEXT I

10000 GET K$
User avatar
Chema
Game master
Posts: 2907
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Changing TEXT / HIRES display size?

Post by Chema »

Not sure if it will help, but I did something similar in Oricium: scorepanel in HIRES, then TEXT for the play area (alternating character sets), then HIRES again to get the two last lines as TEXT with another character set for the radar.

You can check the sources here https://osdn.net/projects/oricsdk/scm/s ... m/common.s

Routine _prepare_play_area calls (line 269) does all the work, but first calls set_graphic_attributes (line 249) HIRES is switched to TEXT.

EDIT: Dbug already answered providing all the relevant information :lol:
User avatar
Symoon
Archivist
Posts: 2145
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Changing TEXT / HIRES display size?

Post by Symoon »

You guys are amazing. Thanks A LOT for the prompt replies!
I'm all over the place thinking about various things and have hard times focusing on things, this will be very helpful :)
User avatar
Dbug
Site Admin
Posts: 4092
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Changing TEXT / HIRES display size?

Post by Dbug »

Ultimately it's not very complicated, but you need to remember things like:
- The HIRES and TEXT modes overlap, so some addresses ends up being the same
- To switch to HIRES you need to put the attribute in some TEXT area which is going to be read by the ULA
- To switch to TEXT you need to put the attribute in some HIRES area which is going to be read by the ULA
- Depending if you are in TEXT or HIRES/TEXT, the charset will not be read from the same location
User avatar
Symoon
Archivist
Posts: 2145
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: Changing TEXT / HIRES display size?

Post by Symoon »

For the fun: it turns out that I was poking the right addresses, but... In direct mode, so when pressing enter and displaying Ready, the HIRES attribute was scrolling and everything got scrambled ;)
Thanks again!
User avatar
Dbug
Site Admin
Posts: 4092
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Changing TEXT / HIRES display size?

Post by Dbug »

Symoon wrote: Sat Aug 06, 2022 1:57 pm For the fun: it turns out that I was poking the right addresses, but... In direct mode, so when pressing enter and displaying Ready, the HIRES attribute was scrolling and everything got scrambled ;)
Thanks again!
When using direct mode in HIRES, POKE #1A,96 is your friend
Post Reply