Author Topic: OUT and INK commands  (Read 314 times)

0 Members and 1 Guest are viewing this topic.

Offline billamu

  • CPC464
  • **
  • Posts: 5
  • Country: nz
  • Liked: 3
OUT and INK commands
« on: 04:17, 10 February 19 »
So I was experimenting with a screen mode I saw in a game published here. It uses a bunch of OUT commands to lower the vertical resolution.
Code: [Select]
10 MODE 0:BORDER 0
20 OUT &BC00,0:OUT &BD00,127
30 OUT &BC00,4:OUT &BD00,18
40 OUT &BC00,5:OUT &BD00,15
50 OUT &BC00,6:OUT &BD00,15
60 OUT &BC00,7:OUT &BD00,17
The problem is that INK commands no longer work, and I want to change the palette while in this "MODE".
Does anyone understand why changing INKs doesn't work and how to fix it?

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 570
  • Country: fr
    • urban exploration
  • Liked: 747
Re: OUT and INK commands
« Reply #1 on: 10:57, 10 February 19 »
the system updates colors every frames, you need to disable this part of the system
Code: [Select]
10 MEMORY &8FFF:DATA 21,F9,B7,C3,DD,BC:FOR i=0 TO 5:READ A$:POKE &9000+i,VAL("&"+A$):NEXT:CALL &9000
use RASM, the best assembler ever made :p

I will survive

Offline GOB

  • Supporter
  • CPC664
  • *
  • Posts: 143
  • Country: fr
  • Liked: 140
Re: OUT and INK commands
« Reply #2 on: 13:18, 11 February 19 »
But Roud, you kill refresh !!!
Problem is that int are double time with your R0=127.
So you got 3 int per Frame instead of 6.And Color refresh is done after 3rd int...

Offline Ast

  • 6128 Plus
  • ******
  • Posts: 928
  • Country: fr
    • Amstrad cpc Website of Ast/iMPACT
  • Liked: 649
Re: OUT and INK commands
« Reply #3 on: 13:52, 11 February 19 »
the system updates colors every frames, you need to disable this part of the system
Code: [Select]
10 MEMORY &8FFF:DATA 21,F9,B7,C3,DD,BC:FOR i=0 TO 5:READ A$:POKE &9000+i,VAL("&"+A$):NEXT:CALL &9000


Well done and thanks to GOB for the tips !!!
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"


Amstrad Plus French Forum

All friends are welcomed !

Offline GOB

  • Supporter
  • CPC664
  • *
  • Posts: 143
  • Country: fr
  • Liked: 140
Re: OUT and INK commands
« Reply #4 on: 14:35, 11 February 19 »

Well done and thanks to GOB for the tips !!!
I don't think it's good. Billamu want the color refresh.Solution is to bring up color refresh on priority system int gestion.#BCD7 can be a solution.

Offline billamu

  • CPC464
  • **
  • Posts: 5
  • Country: nz
  • Liked: 3
Re: OUT and INK commands
« Reply #5 on: 04:14, 12 February 19 »
But Roud, you kill refresh !!!
Problem is that int are double time with your R0=127.
So you got 3 int per Frame instead of 6.And Color refresh is done after 3rd int...
Hi GOB & Roudoudou.
So I was tinkering with it, and found that I could still get the colour refresh as long as I didn't try to clip (shorten) the height of the screen (ie:
Code: [Select]
OUT &BC00,4:OUT &BD00,x:OUT &BC00,5:OUT &BD00,x).
So what you're saying GOB is that by using these out commands, it clips the screen at the 3rd int, therefore it never reaches the colour refresh?
Am I crazy to think I could have my cake and eat it by clipping the display starting at the 4th int?
And to be up front, I'm trying to make something for the 10 LINER compo and I can't use M/C without it ending up in the WILD category.
 

Offline billamu

  • CPC464
  • **
  • Posts: 5
  • Country: nz
  • Liked: 3
Re: OUT and INK commands
« Reply #6 on: 10:31, 14 February 19 »
For anyone still interested in this problem, I worked it "OUT" (hehe).
No, literally! Use the OUT command to force a palette swap:
Code: [Select]
OUT &7f00,pen:OUT &7f00,inkMind you, pen and ink are using hardware values.

« Last Edit: 10:51, 14 February 19 by billamu »