GFA
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
-40%
Le deal à ne pas rater :
Tefal Ingenio Emotion – Batterie de cuisine 10 pièces (induction, ...
59.99 € 99.99 €
Voir le deal

Mode 320x240 Truecolor pour FALCON

Aller en bas

Mode 320x240 Truecolor pour FALCON Empty Mode 320x240 Truecolor pour FALCON

Message par Shadow272 Mer 25 Nov - 12:03

Mode 320x240 Truecolor pour FALCON
Par Cooper


Exemple d'utilisation du mode 320x240 en TrueColor sur Falcon 030.

Routine de SimonSunnyboy/Paradize.

[Vous devez être inscrit et connecté pour voir ce lien] :

Code:

'
' Falcon TrueColor Video for GFABASIC
' (c) 2007 by Simon Sunnyboy / Paradize
'
' Use at your own risk!
'
HIDEM
INLINE tcvideomode%,1718
RESERVE 200000
'
falcon!=FALSE
fehler$=""
oldphysbase%=XBIOS(2)
ON ERROR GOSUB errorhandler
ON BREAK GOSUB endit
screenmemory%=MALLOC(153856)
IF screenmemory%=0
  PRINT "NOT ENOUGH MEMORY!"
  RESERVE
  ~INP(2)
  EDIT
ENDIF
physbase%=AND(ADD(screenmemory%,255),&HFFFFFF00)
'
' setup videomode in supervisor - will set Word tcvideomode%+8 to
' &hffff if this is a Falcon - saves videl settings
~XBIOS(38,L:tcvideomode%)
'
IF WORD{tcvideomode%+8}=0
  ~INP(2)
ELSE
  falcon!=TRUE
  ~XBIOS(5,L:physbase%,L:physbase%,L:-1)
  ' CLS and _ALL_ gfa graphics commands do not work anymore until you
  ' restore the video mode
  ' thank god, TC video is chunky
  '
  '
  FOR i%=0 TO 639 STEP 2
    WORD{physbase%+i%}=WORD(0)  ! clear 1st scanline
  NEXT i%
  ' clear remaining scanlines
  FOR i%=1 TO 239
    BMOVE physbase%,physbase%+i%*640,640
  NEXT i%
  '
  FOR i%=0 TO 639 STEP 2
    WORD{physbase%+i%}=WORD(&HF000) ! draw red pixels
  NEXT i%
  '
  FOR x%=0 TO 639 STEP 2
    VSYNC                       ! spend some time to make sure OS is intact
    WORD{physbase%+640+x%}=WORD(&H1F)
  NEXT x%
  ~INP(2)
  '
ENDIF
'
endit
'
PROCEDURE errorhandler
  fehler$=ERR$(ERR)
  GOSUB endit
RETURN
PROCEDURE endit
  IF falcon!
    ~XBIOS(38,L:tcvideomode%+4)
  ENDIF
  '
  ~XBIOS(5,L:oldphysbase%,L:oldphysbase%,L:-1)
  '
  IF fehler$>""
    ~FORM_ALERT(1,fehler$)
  ENDIF
  ~MFREE(screenmemory%)
  RESERVE
  '
  SHOWM
  EDIT
RETURN
Shadow272
Shadow272
Admin

Messages : 328
Date d'inscription : 28/12/2017
Age : 65
Localisation : Hainaut Belgique

http://toutatari.blog4ever.xyz/

Revenir en haut Aller en bas

Revenir en haut

- Sujets similaires

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum