![]() |
![]() |
#1 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
Many Questions
![]() ![]() |
![]() |
![]() |
#2 | |||
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,030
|
Quote:
Quote:
Quote:
Only if you write your own bootblock, then you have the option to interrupt OS initialisation at an early stage. But still you can use graphics, intuition and other parts which do not need DOS. |
|||
![]() |
![]() |
#3 | |||
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
Quote:
Quote:
Quote:
Speaking of that, is there any better way to change screen colours than copper lists? |
|||
![]() |
![]() |
#4 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
PS: I'm using SetRGB4() as is suggested in the intuition manual, but for some reason it's changing the colour of the screen of the app that opened it. Examples: If I open it from a shell, the workbench colours change to what my screen's should, but my screen's colours don't change. If I open it from DOpus, it's colours change but my screen's colours don't.
I'm totally perplexed as to why this is happening, please help... ![]() |
![]() |
![]() |
#5 | ||
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,030
|
Quote:
Quote:
myscreen = OpenScreen (&newscreen); SetRGB4 (&myscreen->ViewPort,0,15,8,0); |
||
![]() |
![]() |
#6 | |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
Quote:
Code:
lea.l NewProgramScreen,A0 ; Load the screen's specifications into A) CallIntuition OpenScreen ; Attempt to open the screen tst.l D0 ; Was the screen opened? beq IntuitionFailiure ; If not, start exiting the program move.l D0,ProgramScreen ; Otherwise, store the screen move.l D0,A2 UseGraphics move.l sc_ViewPort(A2),A0 moveq #0,D0 moveq #$0,D1 moveq #$0,D2 moveq #$0,D3 Call SetRGB4 move.l sc_ViewPort(A2),A0 moveq #1,D0 moveq #$C,D1 moveq #$8,D2 moveq #$0,D3 Call SetRGB4 Before my program runs: After my program runs and opens a screen: |
|
![]() |
![]() |
#7 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,030
|
Code:
move.l sc_ViewPort(A2),A0 Code:
lea sc_ViewPort(A2),A0 |
![]() |
![]() |
#8 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
I'm continuing to run into issues with diskfont.
This is how I'm opening and closing fonts: Code:
lea.l FontTextAttribute,A0 ; Load the font's specifications into A0 CallDiskFont OpenDiskFont ; Attempt to open the font tst.l D0 beq FontFailiure move.l D0,Font Code:
move.l Font,A1 ; Load the font into A1 CallDiskFont CloseFont ; Close the font |
![]() |
![]() |
#9 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,030
|
CloseFont is in graphics.library, not in diskfont.library.
diskfont is really only to load fonts from disk, everything else is done by graphics. |
![]() |
![]() |
#10 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
I keep making the mistake of using the wrong library. Thanks. I'm going to add that to my list of things to check for.
|
![]() |
![]() |
#11 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
I'm trying to open a screen in WB 1.3, here are the details:
Code:
NewProgramScreen dc.w 0,0 ; XPos, YPos NewScreenWidth dc.w 320 ; Width NewScreenHeight dc.w 200 ; Height dc.w 2 ; Colour Depth dc.b 2,1 ; Detail Pen, Block Pen dc.w 0 ; View Mode dc.w CUSTOM_SCREEN ; Screen Type Pointer FontTextAttribute ; Font Pointer ProgramScreenTitle ; Pointer to title string Pointer ; Gadgets Pointer ; Bitmap Code:
FontTextAttribute Pointer FontName ; Name dc.w 11 ; Height dc.b FS_NORMAL ; Style dc.b 0 ; Flags Code:
ProgramScreenTitle String "abcdef ABCDEF" Code:
lea.l NewProgramScreen,A0 ; Load the screen's specifications into A) CallIntuition OpenScreen ; Attempt to open the screen Thanks for all the help so far by the way. |
![]() |
![]() |
#12 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,030
|
Is it really necessary to do this in assembler? It is so difficult to read. And to write obviously. A higher level language would have told you about most of the mistakes you did. And it lets you call the functions by name only. The correct library base is used implicitly.
The code you quoted is ok. You have to quote the entire program to reproduce the error and to find the mistake. |
![]() |
![]() |
#13 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,068
|
Assuming that String is 'DC.B' and Pointer is 'DC.L \1 or 0', it looks OK. How does CallIntuition look like, is the pointer valid?
If possible, go through the code with debugger and skip over system calls... Also, alignment OK? |
![]() |
![]() |
#14 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,549
|
Guru #00000025 would be a
trap #5instruction. Is it reproducible? Then try to use it as a breakpoint in the UAE debugger ( fi 4e45). When the crash happens at OpenScreen it is most likely that you are jumping at some random address. Wrong base pointer in A6? As a/b said: get accustomed to using a debugger and have a closer look at that call. |
![]() |
![]() |
#15 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
Ah, I was using custom_screen rather than customscreen.
|
![]() |
![]() |
#16 |
Registered User
Join Date: May 2022
Location: Adelaide, South Australia, Australia
Posts: 208
|
For some reason CloseFont isn't freeing any memory. Is this normal?
|
![]() |
![]() |
#17 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,378
|
if the font is already open by some other application, probably. Those are shared resources.
|
![]() |
![]() |
#18 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,319
|
Fonts work pretty much like libraries. They aren't removed from memory automatically - only if the system runs low on memory.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Apollo 1240 - Questions about questions | StompinSteve | Hardware mods | 19 | 19 July 2021 02:05 |
OS 3.9 Questions | videofx | support.Apps | 2 | 06 July 2014 10:39 |
Thank you but more questions! | bluebrummie | New to Emulation or Amiga scene | 12 | 18 April 2006 04:22 |
Two questions | Drakon | request.Old Rare Games | 7 | 19 November 2002 19:33 |
A few questions! | One1 | New to Emulation or Amiga scene | 2 | 30 October 2002 17:41 |
|
|