Developer diary

2020.05.01 New command added : compact.lib/Spack ScreenID, Left, Top, Right, Bottom To BankID

01 mai 2020
Frédéric Cordier

It's just a variant of the existing command : SPack ScreenID To BankID, Left, Top, Right, Bottom
I found the order more logical when entering screen coordinate after ScreenID and before BankID.

Due to that insert in the compat.lib, Unpack commands will not be recognized and must be updated inside existing AMOS Professional source code (.AMOS Files).

2020.04.30 23.02 SPack & UnPack fixed and completed.

30 avril 2020
Frédéric Cordier

I have found a simple solution to make SPack & Unpack works for both ECS and AGA configuration.
Here is how it work.

Whatever the configuration you run the program, SPack will store 256 colors in the image. It's better this way as the AMOS structure to handle header is well fixed and there is no risk to override area.

When you Unpack picture, it will firstly consider it's a 256 colors registers sized (even with 32 colors, simply that others colors will be rgb(0,0,0).). If header is not found witht eh PsLong AGA size (for 256 colors), it will go back and check the header at PsLong ECS size (for 32 colors).

With this you can pack unpack picture created with AMOS Professional AGA.
But you can also Unpack pictures created with older AMOS Professional.

As an additional notes, Pictures/Screens packed with AMOS Professional AGA will not be compatible with older AMOS Professional versions.

I Plan to rename AMOS.Library to AmosAGA.library to be sure that an AMOS Professional AGA program will never be run with an older AMOS.Library version.

2020.04.30 09.38 compact.lib/SPack & Unpack limitations to resolve.

30 avril 2020
Frédéric Cordier

Hello Everyone,

Due to the fact that AMOS Professional uses fixed size structures, I encounter a problem I must resolve to makes some commands being compatible with old AMOS Professional's datas, and new ones. It's the case of the SPack and Unpack methods.

in the +Equ.s file, AMOS Professional define this small structure for the bitmap compression header :

+Equ.s Bitmap Packer/Unpack structure lines 914-950

; ___________________________________
; ___________________________________

; Packed screen header
PsCode rs.l 1
PsTx rs.w 1
PsTy rs.w 1
PsAWx rs.w 1
PsAWy rs.w 1
PsAWTx rs.w 1
PsAWTy rs.w 1
PsAVx rs.w 1
PsAVy rs.w 1
PsCon0 rs.w 1
PsNbCol rs.w 1
PsNPlan rs.w 1
PsPal rs.w 32
PsLong equ __RS
SCCode equ $12031990

- The pointer PsPal will store 32 colors in a total of 32 words.
- The constant PsLong define the total length of the structure.

If I want to add support for AGA 256 colors, I wll have to makes PsPal become : PsPal rs.w 256.
This mean that this structure will be longer.
It result in an incompatibility issue with bitmap packed with previous versions of AMOS Professional as to Unpack it uses PsLong to shift to area to decompress...

I tried to define it dynamically. Files are correctly created but AMOS Professional return "It's not a packet bitmap".
There are some other places where data are stored with a fixed size. THis mean that I will probably have to make a choice.

- Create a new Packing/Unpacking set of methods that will be incompatible with older, and leave older for compatibility (should takes more time).
- Update the new Packing/Unpacking method to directly handle at max 256 colors in a static size way (always store area with 256 colors, like amos did previously with static size of 32 colors even for screen with smaller depth.

This choice will have an impact on compatibility and way of coding under AMOS.


2020.04.28 18:23 : Current TO DO list and Ideas from AMOS Pro users

28 avril 2020
Frédéric Cordier

By re-opening the project, I have also re-opened the previous <<to do list>> with both my ideas and ideas from AmosPRO users.

Here is the current list :

- Screen open add ECS:1024x1024 limit, AGA:2048x2048 limit
- Check Pack/Unpack color count te retrieve compatibility with ECS packing
- Makes BOB/Sprite get to get the true amount of color and makes Get Color Palette restore the correct amount.
- Add AGA 24 bits color support in copper list
- Add AGA 24 bits color support in load IFF / IFF Anim system
- Add support to change sprites color palette index.
- Update demo to use SCREEN HIDE/SHOW to now display IFF/ILBM loading times.
- Add internal checking to avoid loading/writing outside of memory banks (Load Frame, etc.)
- (WIP) I plan to add in next update a "Use Screen Palette" to switch AGA Palette between screen own aga palette.

- Screen open resolution up to 4096x4096 pixels (Vampire users)
- Increase the AMAL system limits up to 16 channels
- Increase the BOBS amount limits up to 64 bobs
- Increase the RAIBOWS system limits up to 4 rainbows
- Update the Object Editor to handle 256 colors
- Update the Sample Editor ( ??? )
- Integrate a faster BOB system (like PowerBobx)
- More dual Parallax modes.
- Integrate a faster Icons tile system (Turbo ? Personal ? ones)
- Implement WAV audio playing (Datatypes ?)
- Support GIF animations
- Support more graphics format for Images loading (jpg, png, bmp, gif, etc. Datatypes ?)
- Import TMX tiled maps (From Windows)

- Add an auto .ASCII save when saving .AMOS files (check if a flag (button, option) can be added in configuration to enable/disable this feature).

If you have ideas or improvements you'd like to see in Amos Professional AGA, feel free to send it using the Contact form available from the menu.


2020.04.27 18.19 Initial Re-Release of AMOS Professional (X) AGA

27 avril 2020
Frédéric Cordier


The first new will contain the detailled changes made to François Lionet's AMOS Professional Official Source Code to add AGA Support :

With the huge amount of works already done, I consider that it enter directly in the case of MIT Licence saying : "Licensed works, modifications, and larger works may be distributed under different terms and without source code."
Some other reasons are also linked to the choice to release only binaries at this moment.
Source code will be released ... Later. When everything will be finished.

- +w.s/CLPopulate updated to calculate copper start screens position depending on ECS/AGA chipset in adequate with +w.s/CpInit changes.
- +w.s/detectChipset method call moved near the beginning of +w.s/Startall to be sure chipset is detected when Copper list is created
- +w.s/CpInit updated to use chipset detection and add AGA Palette only if chipset = AGA.
- Completed the fix for the bob/icon image pasting in big screen area at bottom (Dom Cresswell reported bug)
- Found that BbAAEc(a?) storage save the bitplane shift to define where to start the 1st byte of an image on screen.
- updated all +w.s file referencies to read/write BbAAEc data to .l
- Removed ext.l on registers that are used for BbAAEc data
- Remain to fix the 2nd part of the BobCalc method that precalculate image render to screen
- added AgaSupport.s/getRgb4FromRgb8 command name : " = get rgb4 from rgb8( RGB24/25 )"
- added AgaSupport.s/getRgb8FromRgb4 command name : " = get rgb8 from rgb4( RGB12 )"
- added AgaSupport.s/retRgb12Color command name : " = "rgb12( Red4, Green4, blue4 )
- added AgaSupport.s/getRgb12rColor command name : "= rgbr12( RGB12 )"
- added AgaSupport.s/getRgb12gColor command name : "= rgbg12( RGB12 )"
- added AgaSupport.s/getRgb12bColor command name : "= rgbb12( RGB12 )"
- added AgaSupport.s/retRgb24Color command name : "= rgb24( Red8, Green8, Blue8 )"
- added AgaSupport.s/retRgb25Color command name : "= rgb25( GenlockBit, Red8, Green8, Blue8 )"
- added AgaSupport.s/getRgb24rColor command name : "= rgbr25( gRGB25 )"
- added AgaSupport.s/getRgb24gColor command name : "= rgbg25( gRGB25 )"
- added AgaSupport.s/getRgb24bColor command name : "= rgbb25( gRGB25 )"
- added AgaSupport.s/createAGAPalette command name : "= Create Aga Palette INDEX"
- added AgaSupport.s/deleteAGAPalette command name : "= Delete Aga Palette INDEX"
- added AgaSupport.s/getAgaPeletteExists command name : "= Is Aga Palette Exists( INDEX )"
- added AgaSuppor.s/cscToAaPl1 command name : "Get Aga Colors From Screen SCREENID, FIRSTCOLOR,AMOUNT to AGAPALINDEX, FIRSTCOLOR"
- Checked +Lib.s/L_InLoadIff11/2 to be sure it will detect Aga/Ecs chipset -> Body uses +w.s/EcCree so, it will be limited to screen limits.
- Added +w.s/detectChipset to detect AGA.
- Added new library : AMOSPro_AgaSupport.lib
- added AgaSupport.s/isAgaDetected command name : "= Is Aga Detected()"
- Update +Interpreter_Config.s : set AMOSPro_AgaSupport.lib as default extension slot #7
- Update +w.s/EcCree : To handle both ECS & AGA on screen creation (including new error messages)
- Added +w.s/EcCree restriction to standart screens to be multiple of 16 pixels. Fetched ones -> multiple of 64 pixels
- Update +w.s/Duale : To handle both ECS & AGA on dual playfield setup
- Update +Editor_Config.s : New error messages added
- Updated SetPalette, GetPalette to also store AGA colors inside Screen Structure (before it saved only in global aga palette)
- Updated +Lib./Sco0 Screen Copy to handle up to 8 bitplanes (was locked to max 6 bitplanes)
- Fixed +Lib.s/iffPal to correctly handle the refresh of up to 256 colors.
- Update +w.s/EcDouble double buffer creation to handle 64 bits bitmap alignemnts.
- Update +w.s/EcDel screen close method to handle both buffers (single and double one) with new buffer creation mode.
- Update +Lib.s/IffPal to handle up to 256 colors in IFF Animations
- Changed the place where the configuration are copied at compilation time (moved them to AMOS/S)
- Changed a place where AMOS.library was copied at compilation time (to AMOS/Libs)
- Moved the concerned files to place where they should be.
- Updated SPack SCR to BANK to handle saving of the 256 colors in the picture packing process.
- Added +w.s/updateAGAColorsInCopper to update the AGA Color palette when screen is opened or unpack done in it.
- Updated Unpack BANK to SCREEN to handle restoring up to 256 colors when unpacking.
- Increased all the APCmp buffers to makes compilation works with large .AMOS files
- Updated compiler.lib & APCmp with changes for the AGA support.
- Updated +W.s/WVbl WaitVbl to use Graphics.library/WaitTOF() instead of manual calculation.
- Fixed the Hires 640px fine scrolling by updating +W.s/WVbl.
- Updated +W.s/EcCree to Add 64bits alignment for Bitmap creation.
- Updated +W.s/EcCopHo to Add DDFStrt & BplxMOD changes when using Fetch Mode in HiRes resolutions.
- Updated +W.s/EcCree screen sizes limitation from 1024x1024 pixels to 2048x2048 pixels
- Updated +Lib.s/L_InScreenOpen to remove Hires limitation to 4 bitplanes.
- Updated +Equ.s/FMode equate to point to register #$1FC to handle AGA Fetch Mode
- Updated +W.s/EcCree by rewritting the Bitmap Allocation to use BMF_DISPLAYABLE to handle Hires.
- Updated +W.s/EcCree to handle FMode depending on screen resolution requested.
- Updated to Includes3.1
- Updated Colour I,R4G4B4 to work with up to 256 colors
- Updated copper list to define colors 32-255 before screens (just after sprites)
- Updated Screen creation to uses up to 8 bitplanes ( 256 colors )
- Updated Created a global aga Palette color for 32-255 colors registers
- Updated commands Colour ID,RGB & =Colour(ID) to be compatible with up to 256 colors
- Added method +W.s/getScr2Color to copy colors 0-15 from screen 1 into colors 16-31 of color 0 in Dual Playfield mode.
- Updated +W.s/Duale to call +W.s/getScr2Color when Dual Playfield is created.
- Updated +Lib.s/InScreenDisplay to call WaitVbl once screen values were updated to fix a bug with "Dual Playfield" command
- Updated +W.s/EcCopHo method to handle bplCon3 value from Screen structure data instead of a direct value.
- Updated +W.s/Duale method to insert color shifting value inside the BplCon3 screen structure data.
- Updated +W.s/EcCree method to setup the default color shifting value a screen will force to use different color palette.
- Updated +Lib.s/L_InScreenOpen to uses #EcMaxPlans+1 instead of direct #7 value.
- Added comments to +W.s/EcOffs (Screen Offset)
- Added comments to +W.s/EcView (Screen display)
- Added comments to +Equ.s concerning Screen strcture offsets/display data
- Created +W.s/CLPopulate reference to point to a particular position in the Copper refresh (where the copper list will be populated)
- Added comments to +W.s/CLPopulate to explain how copper list are populated with screens, rainbows, etc.
- Updated +Equ.s with BplCon3gl rs.w for default BplCon3 values concerning Sprites & special registers values.
- Updated +W.s/EcCopBa method to reset BplCon3 (be sure that Dual Playfield are correctly closed and palette to 0.)
- Added many comments to +W.s/EcForceCop method (unfinished)
- Updates +W.s/EcCree to handle 8 bitplanes with BPU3 field in standard screens (non DPF)
- Updated DualPlayfields AMOS sample to contains WAIT VBL calls after "Screen Display" calls (as they require this to work)
- Updated +W.s/EcCopHo method by inserting BplCon3 register to allow 2nd Dual Playfield Screen to use colors 16-31 [Temporar change]
- execute aData to update Editor_Config
- execute aw to update Amos.library
- Updated the new DualPlayfield scrolling test demo.
- Updated +W.s/Duale method to handle 2x16 colors lowres dual playfields
- Updated +W.s to handle 6 new error messages for Duale method
- Updated +W.s/Duale method to output errors using the 6 new error messages.
- Updated +Editor_Config.s file to contains the 6 new error messages ( Edt204-209 )
- execute aData to update Editor_Config
- execute aw to update Amos.library
- Restart from AMOSProfessional original source code from marc365 repository.
- Updated +lib.s from my AMOSCommenter JAVA tool.
- Added +lib_mList.s containing all the AMOS commands definition from +lib.s
- Updated extensions +Compact.s, +IO_Ports.s, +Music.s, and +Request.s from my AMOSCommenter JAVA Tool.
- Added +Compact_mList.s, +IO_Ports_mList.s, +Music_mList.s and +Request_mList.s containing the plugin AMOS commands definitions
- Updated my own extensions/Personal-1.1a library to be compilable like others files.