Ultimate Amiga
Network Boards => AMOS Language Discussion => AMOS Factory => AMOS Professional Forum => Topic started by: Volvo_0ne on September 27, 2017, 06:18:14 PM
-
Hi, I wondered if there is any way I can make ZX Spectrum type screen bars (The tape loading type ones) in AmosPro?
I've tried swapping different colour screens as fast as I can, then putting in random delays but it doesn't seem to make the effect I'd like.
Anyone got any ideas please?
-
Hi there. Here are two ways you could do it....
1. Create a rainbow for colour 0 (border colour) with a long list of values then rotate
the rainbow.
2. Create a larger than normal screen in low res so that the amiga sets it to overscan mode. You can then use random thin rectangles to create the effect.
Hope this helps. Kev G
-
Dim C(1)
C(0)=$F
C(1)=$FF0
Repeat
Doke $DFF182,C(Rnd(1))
Until Mouse Click or Inkey$<>0
Actually you should Doke to $DFF180 instead, but then I can't guarantee you will see anything in case you use an emulator.
-
Dim C(1)
C(0)=$F
C(1)=$FF0
Repeat
Doke $DFF182,C(Rnd(1))
Until Mouse Click or Inkey$<>0
A similar color cycling trick can also be done without the poking by using the the AMOS Flash command:
Ink 2
Bar 0,10 to 320,20
Flash 2,"(00F,2)(0FF,3)(FFF,1)"
Repeat
Until Mouse Click
Flash Off
-
A similar color cycling trick can also be done without the poking by using the the AMOS Flash command
It can't be possible to break the background into bars if you use the Flash command, so I think rainbows are the only option if my proposed doking doesn't look clean enough.
-
It can't be possible to break the background into bars if you use the Flash command, so I think rainbows are the only option if my proposed doking doesn't look clean enough.
True. If the Rainbow command isn't exactly what you need (It only changes one color per scan line), you could try programming the Copper list directly. See Appendix F of the AMOS Pro manual for more info.
-
Dim C(1)
C(0)=$F
C(1)=$FF0
Repeat
Doke $DFF182,C(Rnd(1))
Until Mouse Click or Inkey$<>0
Actually you should Doke to $DFF180 instead, but then I can't guarantee you will see anything in case you use an emulator.
WOW that is just what I wanted, thanks :)
How does it work tho?
I understand the BASIC, but not the "DOKE" (or rather what that address actually does)
And is there a list anywhere of useful AMOS POKE/DOKE/LOKE addresses which influence the system similar to the ZX Spectrum's System Variables area?
Thanks for your help.
-
How does it work tho?
I understand the BASIC, but not the "DOKE" (or rather what that address actually does)
The DOKE command sets the value of a word (2 contiguous bytes) in the computer's memory. Some of the locations (addresses) in memory have been reserved for the Amiga's custom chip registers. Usually, these registers start at address $DFF000 which is known as the register base address. Base + $180 is the color register for color 0. So changing this value will change what color is displayed as color 0 on the display. Changing this while the screen is being drawn causes effects like color cycling, rainbows, or dynamic HAM displays. Typically these reisters are modified by the COPPER chip using custom copper lists, but the DOKE command will also work if timing doesn't need to be exact.
And is there a list anywhere of useful AMOS POKE/DOKE/LOKE addresses which influence the system similar to the ZX Spectrum's System Variables area?
See the Amiga Hardware Reference Manual for more details on the registers, and the color registers specifically:
http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0027.html
http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0011.html
-
I'll add a few links too :)
Here is a complete list of the avaliable registers: http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0060.html (http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0060.html)
And here is a much easier way to learn what they actually does: http://ada.evergreen.edu/~tc_nik/files/AmigaHardRefManual.pdf (http://ada.evergreen.edu/~tc_nik/files/AmigaHardRefManual.pdf)
-
Thanks guys, much appreciated :)
BTW is there any way to make the border (EG anything which is not screen) black and Keep it that way regardless of colour changes in the screen area?
I know Colour Back should do this, but if (for example) you move a rainbow below the bottom of the screen area, it colours the lower border which looks really pants!
-
Only on AGA. The only other way to keep the border color black is to apply the Copper rainbow to some other palette entry.
-
Thanks SamuraiCrow
Next question.....
Is there a way to read the Track &/Or Sector number being accessed by a Disk In realtime?
TIA
V1
-
You're welcome but please put your next question in another thread. Otherwise it will result in off-topic remarks.
-
Message recieved and understood ;D