MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Nspire Compatibility
PostPosted: Sun 06 Dec, 2009 2:40 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Does VDU 4 crash as well?


Top
 Profile  
Reply with quote  
 Post subject: Re: Nspire Compatibility
PostPosted: Sun 06 Dec, 2009 3:06 am 
Offline
New Member

Joined: Tue 11 Nov, 2008 7:36 pm
Posts: 25
VDU 4 does not crash.


Top
 Profile  
Reply with quote  
 Post subject: Re: Nspire Compatibility
PostPosted: Sun 06 Dec, 2009 3:22 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Well, I'm stumped, then!

The various text outputting routines are vectored, so when switching MODE or between VDU 4/VDU 5 the routines that are responsible for outputting text are swapped. In theory, if it's part of the sprite-drawing code that's to blame (which is used to draw characters in VDU 5 mode) then it should only crash when text is output, but an infinite loop to suppress output didn't apparently help.

VDU 5 does nothing special that should trigger a crash that VDU 4 doesn't do, as far as I can see (source):
Code:
; ========================================================================================
; VDU 4                                                           DRAW TEXT AT TEXT CURSOR
; ========================================================================================
Vdu4
   ld hl,(Text.4.PutMapNoWriteBuffer)
   ld (Text.PutMapNoWritebuffer+1),hl
   ld hl,(Text.4.PutMap)
   ld (Text.PutMap+1),hl
   ld hl,Text.Cursor.Up.Routine    \ ld (Text.Cursor.Up+1),hl
   ld hl,Text.Cursor.Down.Routine  \ ld (Text.Cursor.Down+1),hl
   ld hl,Text.Cursor.Left.Routine  \ ld (Text.Cursor.Left+1),hl
   ld hl,Text.Cursor.Right.Routine \ ld (Text.Cursor.Right+1),hl
   ld hl,Text.Cursor.PutBlinking.Routine \ ld (Text.Cursor.PutBlinking+1),hl
   ld hl,Text.Cursor.MoveToLeft.Routine \ ld (Vdu.Text.Cursor.MoveToLeft+1),hl
   xor a
-   ld (Text.GraphicalText),a
   ret


; ========================================================================================
; VDU 5                                                       DRAW TEXT AT GRAPHICS CURSOR
; ========================================================================================
Vdu5
   ld hl,Text.Graphical.PutMap.Routine
   ld (Text.PutMapNoWritebuffer+1),hl
   ld (Text.PutMap+1),hl
   ld hl,Text.Graphical.Cursor.Up.Routine    \ ld (Text.Cursor.Up+1),hl
   ld hl,Text.Graphical.Cursor.Down.Routine  \ ld (Text.Cursor.Down+1),hl
   ld hl,Text.Graphical.Cursor.Left.Routine  \ ld (Text.Cursor.Left+1),hl
   ld hl,Text.Graphical.Cursor.Right.Routine \ ld (Text.Cursor.Right+1),hl
   ld hl,Text.Graphical.Cursor.PutBlinking.Routine \ ld (Text.Cursor.PutBlinking+1),hl
   ld hl,Text.Graphical.Cursor.MoveToLeft.Routine \ ld (Vdu.Text.Cursor.MoveToLeft+1),hl
   ld a,$FF
   jr -


Top
 Profile  
Reply with quote  
 Post subject: Re: Nspire Compatibility
PostPosted: Mon 07 Dec, 2009 10:32 am 
Offline
New Member

Joined: Sun 09 Nov, 2008 1:56 pm
Posts: 67
well, vdu4 loads (Text.4.PutMapNoWriteBuffer) in (Text.PutMapNoWritebuffer+1), but vdu5 loads the adress of a routine? :?:


Top
 Profile  
Reply with quote  
 Post subject: Re: Nspire Compatibility
PostPosted: Mon 07 Dec, 2009 11:14 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Text.4.PutMap is a variable that stores the address of the routine that is used to put characters on the screen and text buffer in VDU 4 mode (Text.4.PutMapNoWriteBuffer is the same but doesn't draw the underlying character to the text buffer at the same time, used for the flashing cursor). These variables contain Large.PutMap.Routine and Large.PutMapNoWriteBuffer.Routine when the large font is in use, Small.PutMap.Routine and Small.PutMapNoWriteBuffer.Routine when the small font is in use. (See Lib\VDU\Text\Modes.asm for example).

The graphical text routines are more flexible, as they don't need to draw the characters to a text buffer, just the screen. For this reason everything goes via Text.Graphical.PutMap.Routine, which performs the decisions to draw using the small or large font itself (bearing in mind you can change to the "wrong" font for the current mode with the *FONT command).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt