add memory lib + maps

This commit is contained in:
Frater 2026-02-07 16:03:29 +01:00
commit 4b62e01e82
10 changed files with 521 additions and 411 deletions

View file

@ -1,6 +1,6 @@
; =============================================================================
; Project : Custom BIOS / ROM
; File : gui_lib.asm
; File : gui/draw.asm
; Author : frater
;
; License : GNU General Public License v3.0 or later (GPL-3.0+)

View file

@ -1,6 +1,6 @@
; =============================================================================
; Project : Custom BIOS / ROM
; File : gui_lib.asm
; File : gui/lib.asm
; Author : frater
;
; License : GNU General Public License v3.0 or later (GPL-3.0+)
@ -21,7 +21,7 @@
; =============================================================================
; --- Configuration ---
%define GUI_RAM_SEG 0x0A00 ; Segment de données UI
%define GUI_RAM_SEG 0x1800 ; Segment de données UI (Safe: après Stack, avant Heap)
%define GUI_MAX_WIDGETS 32 ; Nombre max de widgets simultanés
; Dimensions
@ -47,6 +47,23 @@
%define SLIDER_HORIZONTAL 1
%define SLIDER_VERTICAL 2
; =============================================================================
; SECTION : API ACTIONS
; =============================================================================
%define GUI_CREATE 0
%define GUI_DESTROY 1
%define GUI_GET_STATE 2
%define GUI_GET_TYPE 3
%define GUI_GET_VAL 4
gui_api_table:
dw gui_api_create
dw gui_api_destroy
dw gui_api_get_state
dw gui_api_get_type
dw gui_api_get_val
; --- Structure d'un OBJET (Bouton, etc) ---
struc widget
.state resb 1 ; État (0=libre, >0=utilisé)
@ -78,10 +95,6 @@ struc widget
alignb 2 ; Alignement mémoire pour performance
endstruc
; =============================================================================
; SECTION : API ACTIONS
; =============================================================================
%macro GUI 1-*
%rep %0 - 1
%rotate -1
@ -92,19 +105,6 @@ endstruc
add sp, (%0 - 1) * 2
%endmacro
%define GUI_CREATE 0
%define GUI_DESTROY 1
%define GUI_GET_STATE 2
%define GUI_GET_TYPE 3
%define GUI_GET_VAL 4
gui_api_table:
dw gui_api_create
dw gui_api_destroy
dw gui_api_get_state
dw gui_api_get_type
dw gui_api_get_val
; -----------------------------------------------------------------------------
; gui_api_create
; Crée un widget et retourne son ID

View file

@ -1,6 +1,6 @@
; =============================================================================
; Project : Custom BIOS / ROM
; File : gui_window.asm
; File : gui/window.asm
; Author : frater
;
; License : GNU General Public License v3.0 or later (GPL-3.0+)