Buscar

openfire hp 50g

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

TO4BIT
DEMO4GS.DIR
PFTEST.RPL
!NO CODE
!RPL
::
*setup palette (4 shades out of 16 possible)
*recomended value B730
HXS 10 037B
xSET4
*34 nibbles in the row 17 bytes (standard scanline length)
*822C0 -memory area used for Gray scale frames in 49G
*(we will use this area for our needs -hardware 4GS buffer)
*83BC0 is the gray scale screen used in 49G, but not used in G+
*so we use it to install our routines there
HXS 10 0C228
HXS 10 0CB38
xINITPF
*Saturn ML example
* this demo doesn't include sample image
* -it only shows how to use INITPF and
* OPEN FIRE library
CODE
 SAVE
% set start address of darker plane in to 00120 register
% set start address of brighter plane in to A.A
% call page-converter routine
% for the demo we're making both this addresses the same
% -basically just converting standard screen
 D0= 00120
 A=DAT0 A
 GOSBVL 83BC0
% this new feature is for menu conversion same as with
% screen demo, we set both pointers to same value -converting
% the standard menu note offset for menu-converter is: #24h
% -in this case (since installed to 83BC0) absolute: 83BE4
 D0= 00130
 A=DAT0 A
 GOSBVL 83BE4
% Following is a sound sample
% ---------------------------
% it uses sound compatibility routine which is installed
% along with page converter
% -it is at offset 1A0 from page-converter
% this routine emulates OUT=C subroutine call for sound control
%duration of the sound (1000 loops)
 LA 01000
 B=A A
*MAINLOOP
%turn speaker on
 LC 800
 GOSBVL 83BD2
%wait for 20 loops
 LC 20
*DELAY1
 C-1 B
 GONC DELAY1
%turn speaker off
 C=0 X
 GOSBVL 83BD2
%wait for 20 loops
 LC 20
*DELAY0
 C-1 B
 GONC DELAY0
 B-1 A
 GONC MAINLOOP
 LOADRPL
ENDCODE
%0 xWAIT
xDONEGS
;
@
OPENFIRE.LIB
history.txt
OPEN FIRE V2.9
http://fly.srk.fer.hr/~manjo/openfire
mario_lohajner@rocketmail.com
------------------------------------
GrayScale system for RPL and Saturn
WARNING:
some commands expect arguments, basic argument checking prevents from calculator crashes,
Basically - rules of sysRPL apply
07.02.2007 update to 2.9
========================
-added OFPPAR
(generates PPAR so you can use complex coordinates with OPENFIRE)
-updated OFVIEW2 and 4
(when you use OFVIEW in a loop to view slides,
you can check the userflag 1 userRPL: 1 FS?
when this flag is set user pressed [ON] key and sequence should be aborted,
when user presses <- the flag is clear and sequence should continue)
24.11.2006 update to 2.8
========================
-added OFVIEW2 (2-bit viewer)
-renamed OFVIEW to OFVIEW4 (4-bit viewer)
(all old programs made using OFVIEW will continue to work without changes,
in new programs please use OFVIEW4 for consistency)
-use [ALPHA] key to switch 2-bit to 4-bit and back
(note: mode switching is not optimal, so don't kill your calculator with it)
-optimised OFVIEW(2 and 4)
(it should be faster now = smoother scrolling)
-2 commands for monochrome to gray conversions are now called:
 ->4GRAY (converts to 4-bit gray GROB)
 ->2GRAY (converts to 2-bit gray GROB)
13.11.2006 update
=================
Added ->4GRAY command for conversion to 4 grayscales (2 bit) GROBS.
Small cosmetic refreshment of the OFVIEW window.
Fixed small bug related to OpenFire listing in APP menu.
14.09.2006 update
=================
Since OPENFIRE is tested and safe on 50G as well as 49G+ i updated the
header image on grayscale emulator to show 50G
25.01.2006 UPGRADE TO 2.6
=========================
Animation player reached decent functionality level, so
it is now included in the library, read README.TXT for details.
04/09/2005 UPGRADE TO 2.5
=========================
New ROM 2.00 has shifted ARM display buffer,
OPEN FIRE 2.5 is both ROM 1.23 and ROM 2.00 compatible
03/19/2005 2.4 UPGRADE
=========================
minor update to OFVIEW image viewer,
added fast scrolling mode:
hold blue shift while scrolling image to scroll faster,
release to scroll in normal speed :-)
02/06/2005 2.4 UPGRADE
=========================
Added new mode STATICPF
STATICPF is actually the first PF mode, just instead of D0/D1 registers Saturn's
hardware register #120 and A.A are used
(for easier patching of the games which require this mode)
Keep the pointer to your dark page in #120, bright page in A.A
and call page-converter when you're ready
Entry points are:
(when installed to recommended 83BC location)
 83BC0 (page converter)
 83BC0+#36d (menu converter)
 83BC0+#18d (sound compatibility)
Similar to SET4.PAR, MODEPF.PAR is now available
------------------------------------------------
MODEPF.PAR is a program
if present it will be executed instead of INITPF
(actually any of the PF mode initializations)
Example 1:
 MODEPF.PAR contains
 << REALPF >>
 Any OPEN FIRE program which uses PF modes, will be forced
 to use REALPF mode
Example 2:
 MODEPF.PAR
 <<
 #120
 "FFFFF"
 POKE
 INITPF
 >>
 This MODEPF.PAR will force INITPF mode, sometimes for some games
 "#120 patch" is needed.
 (you have to write "FFFFF" in to #120 before INITPF is executed)
 with MODEPF.PAR you can easily do that.
NOTE: primary purpose of MODEPF.PAR and SET4.PAR are debugging purposes,
use them to explore and find optimal palette and mode for your conversion,
When done with debugging, it is recommended that you hard-code
your optimal values in your converted game.
01/17/2005 UPDATE to 2.4
=========================
-version 2.3 was not released but with 2 new modes added it is worth changing version
;-)
two new modes are:
REALPF and
HYBRIDPF
REALPF
------
-does real page-flipping in monochrome mode (doesn't need palette to be set)
(lower 64 lines of the screen are page-flipped you set your bit planes via #00120
and #00130 registers, your game is responsible for accurate frame timing.
the top 16 lines are monochrome (1 bit per pixel)
you can customize the header with SETSTA command and 160x16 monochrome GROB
(just the way you would with INITPF)
HYBRIDPF
--------
-initiates 4GS mode similar like INITPF,
(needs palette to be set -recommended values: #F730 or #7320)
-wave-like effect is possible with other palette values due to interference
between page-flipping and hardware gray-scale dithering.
-the top 16 lines are displayed in 4GS mode done by hardware, prepare 320x16 GROB
(this is really 2 Bit 160x16 image) and use SETSTA command as explained with INITPF
-lower 64 lines are page-flipped bit planes,
HYBRIDPF works the similar way like REALPF
set pointers to your bit planes via #00120 and #00130 (menu is supported of course)
NOTE:
although REALPF and HYBRIDPF are not pure hardware modes -they may allow you to
display images with more than 16 shades of gray.
(depending on number of bit-planes used in your game or software and
your page-flipping algorithm)
01/07/2005 UPDATE to 2.3
=========================
Removed "games links" from APPS menu, but you still have GAMES utility available which
works the same way like "games links" worked
Respecting all the concepts i introduced until now, i introduced one more feature
-menu conversion
to convert menu have your values set in 00130 (menu address) and 00128 menu position
it uses the same code as page-converter, it is only reconfigured differently on new
entry point:
Use + 24h to convert menu if your program or game uses one
For more details see new PFTEST.RPL
PFTEST.RPL demonstrates how to use:
page-converter
menu-converter and
sound-compatibility routine
Some games when converted may produce reversed palette, or flickering wave-like effect
you have two ways of patching these issues:
1. use rotated palette recommended value is #B730
"rotated" palette is: #B370
NOTE: #037B is inverted
2. force initial page-swap by forcing a high value in 120 (or 130) register.
#120 "FFFFF" POKE
-will write #FFFFF in to #120 register, this way initial swap of bright-dark pages
will be forced,
same principle applies to menu, you only need to write to #130
#130 "FFFFF" POKE
NOTE:
by forcing low value (#0) in #120 you're switching off address compare
(forcing no swap mode)
When no value was forced, page-converter will compare address in 120 with address in A.A
the lower will be considered as darker page
12/27/2004 unofficial UPDATE to 2.3
=========================
I was tired of announcing sound-entry point movements so I finally decided
to make sound entry fixed.
The way how ARM routines are launching is better in general:
 -smaller for few instructions
 -faster too :-)
sound compatibility routine is at 18 nibbles offset, and i hope it will stay there :-)
Added "Game Links" feature.
if you are familiar enough with userRPL to make your menu using TMENU command
-you will be able to create a nice choose box (or soft menu) depending on your flag
settings where all your favorite game will be available.
Your games are listed by friendly names, and easy accessible with very little effort.
You can start "Game Links" by typing "GAMES" or in APPS menu "Game Links".
The TMENU compatible list should be in your HOME directory in GAMES.LNK file (variable).
although HOME folder is recommended you can create a sub directories,
and create different GAMES.LNK variables in subdirectories this way you can create
groups of games very easy.
Another important difference is in the way you call page-converter.
you don't need to move your page-addresses to D0 and D1 and then call page-converter.
Just find a place in your code, when you change 00120 register, and put page-converter call
PRIOR to DATx=A if you use DATx=C you will probably want to add ACEX too :-)
PFTEST.RPL is updated to work with OPEN FIRE 2.3
12/18/2004 UPDATE to 2.21
=========================
ADDED USER DEFINED PALETTE SETUP
SET4 command now looks for SET4.PAR variable it will use this value for palette,
(any data in the SET4.PAR will be considered as user binary)
if no SET4.PAR is found -value specified in the game / program is used
-you can use this to adjust default palette in your favorite game to your preferred value
new recommended value for palette: #B730
12/18/2004 UPDATE to 2.2
=========================
While Lilian was porting his Scroll_4C he discovered another bug in OPEN FIRE.
I admit I never programmed a hardware scroller on old Saturn, so I made offset register and
scan length register support how I figured it should work :-)
It turned out that Saturn had few tricks on it's own in this subject.
Luckily Lilian was familiar with this behavior :)
So here it is -OPEN FIRE now emulates strange behaviors too :-)
Code efficiency remained the sound compatibility moved (of course)
1E8 is the new offset
12/13/2004 UPDATE to 2.1
=========================
with new OPENFIRE compatibility of INITPF is enhanced even further
it is fully controlled by Saturn hardware registers now
so first argument of INITPF is not needed anymore (recommended was #22)
from version 2.1 use following recommended values:
2:#822C0
1:#83BC0
INITPF
version 2.1 runs again from any port (0,1 or 2)
-for best results 0 and 2 are recommended
12/01/2004 UPDATE to 2.0
=========================
test have shown that 48GII has some differences not allowing OPENF IRE to work,
so separate version for other calculators will be needed.
If HP doesn't provide ROM fixes which could allow page-flipping to work normally i will
consider to make versions for other calculators.
NEW:
Saturn's Left margin register is now supported in page-converter routine.
I needed to rewrite the page converter for that, but at the same time i made
some speed improvements. However i doubt you will notice that, because page-converter is
fast enough to run much faster than display refresh.
Due to new page-converter sound compatibility entry point has moved a bit
the old offset was 1A0 the new offset is 1E0
...so if you want to use sound-compatibility routine,
-just call (installation address)+#1E0.
11/14/2004 UPDATE to 1.9
=========================
OPENFIRE 1.9 should support 64 lines screen (not tested) as well as 80 lines
Status area (top 16 lines) is configurable with SETSTA command
2: Grob 320x16
1: #822C0 <- base address of 4GS buffer
SETSTA
-will update the status area with your 4 shades grob.
INITPF
-displays the default (OPEN FIRE V1.9 status bar / area)
-keeps the default refresh rate (so some flicker may be noticeable)
NOTE:
IF YOU USE INITPF AND SETSTA OPENFIRE *MUST* BE INSTALLED IN PORT0 TO RUN PROPERLY.
IF YOU DON'T USE INITPF NOR SETSTA LIBRARY MAY BE INSTALLED IN ANY OTHER PORT (PORT2)
THIS WILL BE FIXED AS SOON AS I FIND OUT WHY DOESN'T IT WORK FROM PORT2 AS EXPECTED.
11/12/2004 MINOR UPDATE version still 1.8
==========================================
-added display refresh to DONEGS
-OFVIEW scrolls trough image but not outside anymore
-added comments to PFTEST.RPL
(demo for INITPF -sound and page-flipping compatibility demo /routines)
-added HP directory with INIT4 / SET4 demo with image (DEMO4GS.DIR)
NEW IN VERSION 1.8
===================
KSB (keyboard state buffer)
-command will scan the whole keyboard with debouncing time specified with KEYTIME
commands
-state of whole keyboard is returned in single 64 bit user binary (HXS).
This is ment for sysRPL/userRPL users only,
as it will allow you to scan entire keyboard from sysRPL 40 times per second.
For faster and simpler key press detection (in your Saturn ML games)
writing your own key scan routine is recommended.
FULL FUNCTIONALITY of INITPF command,
added sound compatibility support
============================================================
with suggestions by Lilian Pigallio, as a tool for porting older games
(page-flipping style) OPEN FIRE may become THE environment for porting
older games to new 49G+
(recommended values)
3: #22h -nibbles per line (must be even number not greater than #28
2: #822C0h -address of hardware frame buffer (must be word-aligned)
1: #80100h -address where compatibility routines will be installed
INITPF
initializes 4 shade GrayScale mode, with compatibility support
once initialized you may call the page converter like:
D0= <address of your darker frame>
D1= <address of your brighter frame>
GOSVBL 80100
to use sound call offset #1A0h with register C setting as you would have set it
for OUT=C call.
example:
LC 800
GOSBVL 802A0 (will trigger speaker on)
C=0 x
GOSBVL 802A0 (will trigger speaker off)
Included is the sample for both page converter and sound:
PFTEST.RPL
Introducing "PF" mode in to OPEN FIRE
==========================================================
PF as in page flipping mode is not really page flipping implementation of
gray scale, it is a command designed to help developers to port their page-flipping
games to G+.
INITPF expects pointer to address where 4GS buffer is located:
recommended value:
1: #822C0
INITPF
as it's other OPENFIRE relatives it will return the actual address used and
offset if you use the recommended value you can discard returned arguments
as 822C0 is aligned address within memory area used by 49G as grayscale frames.
For games which are using this area for their graphics, some other location is recommended
-for example:
Address within GDISP #87180,
in that case be sure to set the width and height properly so you will have enough memory available)
Along with library a source code in file: 'scan.asm' is provided,
-this is a sample of Saturn ASM code which will convert and display your 2 pages on 4GS screen.
Introducing "4GS-four gray shades" mode in to OPEN FIRE
==========================================================
-3 new commands for 2 bit grayscale mode,
4GS will be interesting to those who will want to produce
games and software
with great dynamics, and for those who will
wan to use advanced "palette rotating" features done directly
by LCD hardware.
INIT4
------
initiates 4GS mode, this command is separated from INITGS to keep
maximum compatibility with previous versions of OPEN FIRE
frame buffer is 80 nibbles wide, (2 bits per pixel)
SET4
----
choose 4 gray levels ("palette") from 16 available to be displayed in 4GS
this is VERY useful for palette rotation effects etc...
Example:
1: #F840
SET4
will choose default shades
"F" the darkest shade
"8" is first brighter shade
"4" is bright shade
"0" is empty
GET4
----
Read chosen shades ("palette") from LCD hardware shades are returned in
User binary: #F840
-the default will be #0
INITGS
------
will initialize the GS mode returns:
#87180 (expect to be different, raw display data start (upper left corner)
#28 (pixel X offset -needed for use with usrRPL and sysRPL)
remember to translate X coordinate as: X*4+OFFSET
screen is (160 nibbles) wide although
DONEGS
------
will resume the normal LCD operation
(resets LCD CONTROLLER to normal state)
just put this to be part of your exit code in your program.
if by some chance LCD doesn't turn back to normal,
just turn the calc OFF and ON again.
->GRAY
--------
is now functional, not just displaying text :-)
to be combined with ROM functions for GROB handling
(Equation to GROB converters etc...)
2:GROB (B/W graphic object)
1:#3 (shade)
->GRAY
will convert your B/W grob to GrayScale of chosen shade of gray
TIP: this can be used to convert old style page-flipping gray scales
to 4-but grayscale.Break the GROB in to pages, convert each page to
shade of proper weight (8,4,2,1) GOR the converted pages to get a
single 4bit GROB.
TO4BIT
-------
additional program (not a part of OPEN FIRE library)
-converts Gdream (page flipping) type of GrayScale to
4 bit BROB type suitable for OPEN FIRE.
OFVIEW
------
simple gray scale interface (window border) added
will display your Grayscale GROB,
able to scroll up-down and left-right
100% UsrRPL -sufficient for basic use will be improved
1:GROB (GS graphic object)
OFVIEW
will display your graphics in 16 shades full screen
keys:
-----
arrow keys -scroll in appropriate direction
<- (backspace) -exit
ON -will interrupt the program -you will stay in GS mode
ON + or - -combined will change your LCD-s contrast
---------------------------------
AUTHOR: manjo
mario_lohajner@rocketmail.com
http://fly.srk.fer.hr/~manjo
2004/2005 XAE project
readme.txt
OPENFIRE V2.9
http://fly.srk.fer.hr/~manjo/openfire
mario_lohajner@rocketmail.com
------------------------------------
Gray Scale system for RPL and Saturn
WARNING:
-some commands expect arguments, basic argument checking prevents from calculator crashes,
Basically -rules of sysRPL apply
==============================================================
List of commands and reference:
-more details may be fund in history.txt and on OPENFIRE site
==============================================================
Chapters:
 1 Initialization
 2 Settings and customization
 3 Closing - resuming normal operation
 4 Additional programs
 5 Frame-buffer / memory specification
=========================================================================================
CHAPTER 1 (Initialization)
=========================================================================================
In order to use Gray Scale graphics proper gray-scale mode must be initiated.
-several modes are available (INITGS, INIT4, INITPF, REALPF, HYBRIDPF, STATICPF)
INITGS and INIT4
-are recommended for development of new games these have no page converters nor sound compatibility routines, only proper graphic mode initialization.
INITPF, REALPF, HYBRIDPF and STATICPF
-these modes are recommended for porting 48 and 49G series games to G+
-while Lilian worked on his games and some other games to port them to G+ we realized
that many games have somewhat different technique for displaying gray-scales however they
all work on the same basic principle (fast switching of screens) I call it page-flipping.
-most 2 pages (4 gray scales) games will work with INITPF, if you have source code available
and can make sure to have dark page in #120 and bright in A.A when you call OPENFIRE, you
can use STATICPF.
these modes are capable of displaying 4 shades of gray
REALPF and HYBRIDPF are used to display more than 4 gray shades and for games which use exotic techniques, where INTIPF and STATICPF don't give acceptable results.
-these two modes may have screen artifacts (barely noticeable flicker),
however they are capable of displaying more than 4 shades even more than 16 shades supported
by hardware.
INITGS
------
 -initiate GS mode, returns 2 binaries, GS mode is HARDWARE 16 shades gray scale
 each pixel is represented by 4 bits (one nibble), and frame buffer is located in
 graphics display area so it is suitable for use with sysRPL routines and Saturn ML
Returned arguments:
 1. Saturn address of frame buffer start for use with Saturn assembly
 2. pixel offset for use with RPL commands which are pixel oriented
INIT4
-----
 -initiate 4GS mode, returns 2 binaries
 similar like INITGS only 2 bit per pixel are used therefore
 4 gray shades are displayed
Returned arguments:
 1. Saturn address of frame buffer start for use with Saturn assembly
 2. pixel offset for use with RPL commands which are pixel oriented
INITPF
------
 -initiate 4GS mode, with buffer located at alternative memory location
 expected 2 user binaries - returned 2 binaries
 2: #822C0 -memory location to be used as LCD hardware buffer
 1: #83BC0 -address where compatibility routines will be installed to
(recommended values - you may adjust according to your needs)
Returned arguments:
 1. Saturn address of frame buffer start for use with Saturn assembly
 2. pixel offset for use with RPL commands which are pixel oriented
(these 2 are just for compatibility with INIT4 and INITGS you may ignore these)
REALPF
------
 doesn't need palette to be set since it uses flipping in monochrome mode
 -compatible with INITPF, it uses monochrome mode to display gray shades using
 page-flipping technique
 -game is responsible for the accurate page-timing
 -works similar to the way how 48 series and 49G used to produce shades
It expects 2 arguments
 2: #822C0 -memory location to be used as LCD hardware buffer
 1: #83BC0 -address where compatibility routines will be installed to
 call page flipping routine when #120 register is set to your screen
 example:
 D0= 00120
 LA address
 DAT0=A A
 GOSBVL 83BC0
 call the menu converter at #83BC0h + #36d
 sound compatibility routine is at #83BC0+ #18d
HYBRIDPF
--------
 -compatible with REALPF and INITPF, initializes 4GS mode and displays 16 lines header
 in the top 16 lines of the display
 -lower 64 lines are used for page-flipped display (real page-flipping is used)
 since it uses 4GS mode palette needs to be set, recommended palette for this mode
 is: #F730 and #7420 tine tuning of the shades is done using contrast register #101
STATICPF
--------
 -mode similar and compatible with INITPF, only difference is that
 -use of pointers is FIXED:
 Saturn's #120 register is used for darker page
 A.A register is used for brighter page
 call page converter once you have both pointers(addresses) ready
=========================================================================================
CHAPTER 2 (Settings and customization)
=========================================================================================
All modes based on 4 shades grayscale hardware mode need palette to be set
-by default (after system restart) palette is set to #0
two commands manipulate
palette:
SET4 and GET4, these commands can be used prior to mode initialization as well
as when grayscale mode is initiated.
These 2 commands can be used for nice palette-rotation effects, fading,
or partial screen fading...
SET4
----
 -set palette of 4 gray shades out of 16 possible,
 -needed for all 4GS based modes
 -expects User binary on STK1 (like #B730 ) for palette definition
 -you will be interested to use this in nice "palette" effects
GET4
----
 -reads the current (active) palette
 -returns User binary (like : #B730 )
When using PF modes top 16 lines are "status line"
-default status line is:
 OPENFIRE <version>
 http://fly.cc.fer.hr/~manjo/openfire
(OPENFIRE version and URL to OPENFIRE site)
-you may want to change this with your homepage URL, use it as a game header,
game score, game status or a form of advertisement banner.
Command which will allow you to do that is SETSTA, you can call SETSTA as many
times as you like when PF mode is initiated.
(You may call if before initialization as well, but when you initiate grayscale mode
it will bring the default header)
SETSTA
------
When using PF modes and compatibility routines on 80 lines display
the top 16 lines are free to be used as status lines.
With this command you can customize the status bar.
Example:
2: GROB 320x16 -this is actually 2-bit GROB 160x16 pixels
1: #822C0 -start of 4GS buffer used with INITPF
SETSTA
=========================================================================================
CHAPTER 3 (Closing - resuming normal operation)
=========================================================================================
To exit from all gray scale modes use DONEGS.
DONEGS configures LCD controller to default values, recommended is that you put DONEGS
in your exit procedure as well as error trap.
If you fail to close the grayscale mode, try to type DONEGS and press enter
(calculator will operate normally although junk may be displayed)
if you prefer a quicker solution -simply turn calculator off and on again
NOTE: ON-C will NOT fix the problem, but turning calc. off and on will !
DONEGS
------
 -disable any GS mode, reset the display to normal values
 -this command is general -same for all modes
=========================================================================================
CHAPTER 4 (Additional programs)
=========================================================================================
These programs are added to the library for demonstration purposes, at the same time they
make useful tools while working with grayscales or developing games or software.
->4GRAY is the 1-bit to 4-bit GROB converter
OFVIEW4 is 4-bit GROB viewer with scroll feature
->4GRAY and ->2GRAY
------------------
 -converts standard (monochrome) GROB to grayscale of specified shade
 -can be used to covert old style grayscales to OPENFIRE GROBs
 ->4GRAY converts to 16 shades (4 bit)
 ->2GRAY converts to 4 shades (2 bit)
 Example:
 2: GROB
 1: #3
 ->4GRAY
 will convert your GROB to 4 bit grob of shade #3
 ->2GRAY
 will convert to 2 bit grayscale grob
OFVIEW4 and OFVIEW2
-------------------
 -display (with scrolling) your 4-bit and 2-bit GROB in level 1
 -program is 100% sysRPL embedded in to the library just for basic use
 -nice simple grayscale frame border
(when you use OFVIEW in a loop to view slides, you can check the userflag 1
userRPL: 1 FS?
when this flag is set user pressed [ON] key and sequence should be aborted)
OFPLAY - Animation Player V2.0 (now included in the OPENFIRE)
-------------------------------------------------------------
-simple, but flexible, animation player enables you to produce video-like, slide-show,
or menu/screens and animations
-if you plan to use the Player in your games skip to TECHNICAL
OFPPAR - Set PPAR variable
--------------------------
-this command sets the PPAR variable so that you can use complex coordinates rather than pixel
coordinates
-by default upper left corner is (0,0) lower right corner is (131,79)
-you can modify generated PPAR for your own neds/effects
UNZIP this zip to your card (or transfer unzipped animate directory to your SD crd)
Inside animate directory you will see:
=======================================
-player
-bird.lnk
-tapping.lnk
-birdy.ani (directory)
-tapping.ani (directory)
player is the animation player/program (system RPL, OPENFIRE must be installed)
===============================================================================
it expects valid path to animation directory -example of valid animation identifier (path):
3:{animate birdy.ani}
Notice the 2 lnk files in animate directory (these can be wherever you like)
=================================================================================
-lnk files are like shortcuts in windows,
-use these files to start the sample animations,
Examine these files (userRPL) to learn how to call the animation player properly.
Easy starting:
-simply browse to these files using filer and press F5 (eval),
the selected animation will start immediately no need to copy in to other ports.
To make long animations posible, animation player uses Port3 as a storage for animation
and related data, however it can be configured easily to use other ports.
in this demonstration you can see 2 animations:
-----------------------------------------------
-birdy.ani (loops forever video-like animation)
-tapping.ani (loops 3 times non-interacive)
Each animation is a directory. It must contain DATA.ANI
-it tells the player how to interpret the content
-try to create your own animation or use included animations to test different vays of
presentation
file which should be HP list file formatted like this:
------------------------------------------------------
{ "animation title or message" 4. 34. 0.02}
-title or message is pushed to stack when animation starts
(can also be a program or any other object)
if you evaluate this when your animation finishes
-you can create nice animation sequences and/or use this field as a "storry board"
-first parameter (4. in this case) is number of loops meaning the animation will repeat itself
4 times in this case, if you put 0. (zerro) it will repeat $FFFFF about milion times.
i belive we can call this "forever"
-second (34.) is the length of animation
(note: animation may be longer but it will start to loop when it reaches this frame)
-last parametter 0.02 (seconds) is the frame delay, you can use 0. to signal the player that user
interaction is expected, if you use 0. user will change slides manualy using left and right cursor keys.
-in user interactive mode first 6 frames (f0, f1, f2, f3, f4, f5) are always accesible directly
using keys F1 to F6. You can use this feature to create help/manual pages for your programs and easily
split them in to sets of 6 pages
-by combining modes described above using simple userRPL you can create interesting interactive sequences
we can call these "presentation" almost like Power Point :-)
-you can use animation player to make interlevel animations, intros and similar goodies in your games
-you can make picture slideshows using your favorite 16 grayscales and so on....
==================================================================================================
 TECHNICAL
==================================================================================================
-player expects 4 parametters
4: 3:{path to animation} <- taged path to animation, can be 2:{blabla} as well
3: #28 <- number returned by INITGS -#28 in most cases,
 be sure to use value returned by INITGS
 -that way your display will be right on every
 software/libraries configuration
2:
#0 <- x-coordinate for animation top-right corner
1: #0 <- y-coordinate for ....
PLAYER
In a starter/config program this will look something like the following:
------------------------------------------------------------------------
<<
 INITGS -> ofs <-initialize OPENFIRE graphics
 (feel free to use INIT4 as well, butin that case don't forget to set
 the palette)
 <<
 DROP <-this is to drop the address returned by INITGS
 (which is not needed if you don't do Saturn assembly)
 3:{animate tapper.ani}
 ofs #0 #0 <-this animation will be in upper right corner
 (may include entire display)
 OFPLAY
 3:{animate birdy.ani}
 ofs #20 #0 <-this animation will start when first animation finishes (or interrupts)
 it will use the last frame of animation1 as background
 OFPLAY
 .
 .
 >>
 DONEGS
>>
NOTE:
-----
Details about how animation will be played are set for each animation individualy
in their related DATA.ANI file.
=========================================================================================
CHAPTER 5 (Frame-buffer / memory specification)
=========================================================================================
Memory location (address) of the framebuffer is returned by INITGS and INIT4,
PF modes (REALPF,STATICPF,HYBRIDPF and INITPF) use specified address for frame-buffer
GS mode framebuffer is 4-bits per pixel (16 shades of gray),
#Fh represents darkest shade,
#Eh
..
#0h represents empty pixel
-there are 160 nibbles in a row, starting with address returned by INITGS.
Visible area has offset from left side OFFSET in pixels is returned by INITGS.
In 4GS mode there are 4 chosen gray shades out of 16 possible
(configurable trough palette register),
-line makes 80 nibbles, 2-bits per pixel, so shades are #3, #2, #1, #0
normal order from left to right LSB first, INIT4 works the same way like INITGS.
depending on palette register they can be any of 16 available shades,
in case when you use standard palette (#B730)
#3 is the darkest shade (translated to #B)
#2 is lighter shade (translated to #7)
..
#0 is empty pixel
NOTE:
-inverted palette register #037B will give you inverted image
In PF modes hardware buffer is the same type as 4GS but its located on address you specified
when initializing.
you don't have to worry about frame-buffer, you will be working inside your own bit planes
as you used to with series 48 and 49
------------------------------
AUTHOR: manjo
mario_lohajner@rocketmail.com
http://fly.srk.fer.hr/~manjo
2004/2005 XAE project

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Outros materiais