English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 14 December 2018, 23:48   #1
Krashan
Hardware Designer

 
Join Date: Aug 2018
Location: Bialystok/Poland
Age: 46
Posts: 45
GfxFree() surprise

I've written following code:
Code:
struct MonitorSpec *msp;

if (msp = (struct MonitorSpec*)GfxNew(MONITOR_SPEC_TYPE))
{
  GfxFree((struct ExtendedNode*)msp);
}
This code unexpectedly generates recoverable guru $0200000D. I have decided to disassemble GfxFree() from my Kickstart 39.106. Guess what, the code only supports VIEV_EXTRA_TYPE and VIEVPORT_EXTRA_TYPE. Two other structures are not handled and explicitly call Alert().

My guess is they simply forgot to add the later two moving from KS 2 to 3. It probably went unnoticed because usually monitor spec structures are never freed. I wonder if it has been fixed in KS 3.1.
Krashan is offline  
Old 15 December 2018, 05:46   #2
Minuous
Coder/webmaster/gamer
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 1,991
Yes, this was fixed for KS3.1.
Minuous is offline  
Old 26 October 2019, 09:04   #3
EmilAmiga90
Registered User

 
Join Date: Sep 2018
Location: Rome / Italy
Posts: 17
I have almost the same problem with GfxNew while attempting to allocate a VIEWPORT_EXTRA_TYPE structure. I get a recoverable alert 0200 000C.

I am using KS 39.106 on WinUAE

I am going to check if any patch is available.

I wonder if it is safe to simply allocate the ViewPortExtra structure by code. I suppose it could work safe now but pheraps it could be incompatible with possible changes in future versions of AmigaOS...
EmilAmiga90 is offline  
Old 26 October 2019, 11:05   #4
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 275
Quote:
Originally Posted by EmilAmiga90 View Post
I have almost the same problem with GfxNew while attempting to allocate a VIEWPORT_EXTRA_TYPE structure. I get a recoverable alert 0200 000C.
This error means that the type you passed in is not supported. VIEWPORT_EXTRA_TYPE is, however, supported. Thus, there is no patch needed - "you did something wrong".

Note, however, that GfxNew() and viewport functions are only supposed to be used by intuition, for building screens, namely.
Thomas Richter is offline  
Old 27 October 2019, 17:56   #5
EmilAmiga90
Registered User

 
Join Date: Sep 2018
Location: Rome / Italy
Posts: 17
Quote:
Originally Posted by Thomas Richter View Post
"you did something wrong". .
You're right

I was sure I could not have done a mistake on such a simple library call...

The debugger helped me realise that I forgot about about the '#' before the constant name

the correc line is: move.l #VIEWPORT_EXTRA_TYPE,d0

As a matter of fact, I used VIEWPORT_EXTRA_TYPE as ram address... . Now it works ok.

I know that the viewport functions are low level and that using them myself means sort of taking over the machine.

My main goal is an AGA display that is system friendly, so I suppose that using proper Intuition screens do not impact performance and enables mouse functions. Right?

As an extreme example, do you think it would be possible/feasible to code a smooth, coloured and fast platform scrolling game using an intuition screen and OS system friendly calls?

I suppose a 68000 A500 without fastram would probably suffer performance issues. Perhaps 68020 A1200 could make it, with at least some fast memory
EmilAmiga90 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
Unexpected surprise inside A500 gunni support.Hardware 20 25 August 2011 22:14
What a surprise ^^ dlfrsilver Retrogaming General Discussion 8 02 June 2006 14:59
Surprise!! Steve project.SPS (was CAPS) 2 22 April 2003 03:29
surprise productions thinlega Amiga websites reviews 2 31 December 2002 21:48
WHD patch for Fireforce (What a surprise!) MethodGit Amiga scene 5 13 August 2001 01:16

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 17:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.06520 seconds with 15 queries