[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] fVDI causes programs calling v_exit_cur() VDI function to bus error



Hi,

On tiistai 04 syyskuu 2012, Eero Tamminen wrote:
> On torstai 30 elokuu 2012, Eero Tamminen wrote:
> > I've just checked several AHCC compiled VDI tester programs[1]
> > under Aranym + MiNT + fVDI.  They all crash to BUS error
> > before showing anything.
> > 
> > If I disable fVDI, they work fine.
> > 
> > Is this a known issue with fVDI?
> 
> The problem is actually v_exit_cur() function usage.
> 
> With fVDI (include to Aranym AFROS), programs calling that
> function will crash to bus error.  Without fVDI (using plain
> TOS, either EmuTOS or real one, or using NVDI), those calls
> work just fine.

I just noticed a comment about MultiTOS in v_enter_cur():
-----------
	v_enter_cur() clears the screen to color 0, removes the mouse
	cursor and enters text mode.

	Supported by all screen drivers.

	You should check that the left mouse button has been released with
	vq_mouse() prior to calling this function. If the button is depressed
	when you call this function the VDI will lock waiting for it to be
	released after v_exit_cur().

	This call is used by a GEM application to prepare for executing a TOS
	application when not running under MultiTOS.
-----------

I was using fVDI with MiNT (Aranym AFROS setup).  Does the above comment
mean that v_enter_cur() and v_exit_cur() aren't supposed to be used with
MiNT / multitasking AES?

If not, what one is then supposed to call in GEM programs that might
get called from TOS command line?

(Is it then up to user to do something before running a GEM program?)



> A minimal test program is attached.

IMHO ignoring such a function if it's not supposed to be used with
MiNT/fVDI would be better behavior than crashing the program.


> I'd like to use the function because e.g. with EmuTOS console,
> GEM programs started from that may not have working mouse
> unless they call v_exit_cur().


	- Eero