English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 25 October 2023, 22:42   #1
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Screen with multiple viewports

After my short interweb search I found few code examples doing multiple viewports for kinky view setups. However, those looked very much involved with manual view setups And my OS side foo is somewhat rusty so I need to take baby steps.
Is there a simple'ish way to open an intuition screen that has more than one viewport? I intend to play around with user defines copperlist, multiple _native_chipset_ resolutions in a single screen (if possible) and custom interleaved bitmaps... gradually. I also wonder how windows would work in such setup?
Obviously, some sample code would be great..
mr.spiv is offline  
Old 25 October 2023, 23:31   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
Child screens do something like that if you're on Kick3+.
Samurai_Crow is offline  
Old 26 October 2023, 22:38   #3
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,233
Quote:
Originally Posted by mr.spiv View Post
I intend to play around with user defines copperlist, multiple _native_chipset_ resolutions in a single screen (if possible) and custom interleaved bitmaps... gradually.

Custom copperlists you can create with UCopperListInit(), CMOVE and CWAIT macros from the graphics.library; they need to be installed into the viewport of the screen, and a final MrgCop() is required to activate them. This is Os-friendly, and the copper list will also move with the screen.


Of course this will only work if there is a copper available, i.e. it will not work on an RTG screen.
Thomas Richter is offline  
Old 27 October 2023, 03:00   #4
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 653
Here’s an example of what can be done with an OS screen:

https://github.com/mheyer32/alienbre...rce/c/screen.c

The screen setup in there activates a custom copperlist that repeats every second line (to shrink the games vertical resolution) while keeping the lower part of the HUD intact.
pipper is offline  
Old 27 October 2023, 12:02   #5
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Quote:
Originally Posted by pipper View Post
url]https://github.com/mheyer32/alienbreed3d2/blob/main/ab3d2_source/c/screen.c[/url]
Thanks! This was great and I'll study it in detail.

Interestingly, I just found some of my old codes done in early -90s for displaying race competitors' number & time based on the start/stop information received over serial (used for results broadcasting in some Enduro race whatever..) and to my surprise the program used OS for screen and copper.. even used serial.device for communications Very(!) not typical for my codings

What still remains a puzzle is if I can do "split screen" using Intuition Screens e.g. upper part of the screen in hires & lower part in lores and both using separate custom bitmaps. I shall hack & try, since I believe it is doable.
mr.spiv is offline  
Old 27 October 2023, 13:06   #6
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,233
Quote:
Originally Posted by mr.spiv View Post
What still remains a puzzle is if I can do "split screen" using Intuition Screens e.g. upper part of the screen in hires & lower part in lores and both using separate custom bitmaps. I shall hack & try, since I believe it is doable.

You need to use child screens for that - these are essentially "two screens for the price of one". The two screens slide together, but have different viewports and different rastports (necessarily, as their characteristics are different).
Thomas Richter is offline  
Old 07 November 2023, 11:03   #7
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
I have been on this a bit again.. The next thing is simple sprites. Is it possible to take over sprite0 (pointer) when using intuition screens? I experimented with FreeSprite(), GetSprite() and ChangeSprite() but that seems not to be the right approach.
mr.spiv is offline  
Old 07 November 2023, 14:35   #8
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
Quote:
Originally Posted by mr.spiv View Post
I have been on this a bit again.. The next thing is simple sprites. Is it possible to take over sprite0 (pointer) when using intuition screens? I experimented with FreeSprite(), GetSprite() and ChangeSprite() but that seems not to be the right approach.
Not possible in intuition.
Samurai_Crow is offline  
Old 28 November 2023, 23:04   #9
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Some experiments later.. intentionally leaking (ahem!) copperlists to lower viewports is a nice thing (tm).
Question about dynamic copperlists. Say, if I want to modify values in a UCopList prepared with CINIT/CWAIT/CMOVE/CEND macros, how is that done without creating a modified list from scratch? Or am I bound to free the old UCopList and then create a new one with modified content?
mr.spiv is offline  
Old 12 January 2024, 15:22   #10
mr.spiv
Registered User
 
mr.spiv's Avatar
 
Join Date: Aug 2006
Location: Finland
Age: 51
Posts: 242
Quote:
Originally Posted by mr.spiv View Post
Question about dynamic copperlists. Say, if I want to modify values in a UCopList prepared with CINIT/CWAIT/CMOVE/CEND macros, how is that done without creating a modified list from scratch? Or am I bound to free the old UCopList and then create a new one with modified content?
My current code does
Code:
..create a new update user copperlist..
FreeVPortCopLists()
...
MakeScreen()
...
..apply a new user copperlist..
RethinkDisplay()
This works but is there "more efficient way"?
mr.spiv is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
FS-UAE Viewports Marskilla support.FS-UAE 13 09 September 2022 17:50
How to do multiple copperlists Havie Coders. Blitz Basic 5 25 April 2020 10:54
Multiple Disks dekrue2018 support.Amiga Forever 1 21 January 2019 01:33
multiple use of traps Galahad/FLT Coders. General 2 27 November 2014 10:53
multiple HDFs BippyM request.UAE Wishlist 1 24 September 2005 23:12

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:36.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11857 seconds with 13 queries