refactor: ajout d'information dans les fichiers MD, réindentation des fichiers, corrections de bogues

This commit is contained in:
Nicolas Hordé 2018-12-12 15:25:04 +01:00
parent 89ac2cc30f
commit 3c7ddafc2d
63 changed files with 48800 additions and 28101 deletions

23
API.md
View File

@ -1,15 +1,20 @@
## Liste des API
## API List
Bibliothèques disponibles dans COS2000
APIs given by COS2000 libraries
### libc
### LIBC
Fonctions disponibles dans la librairie "libc"
All fonction in the "libc" library.
#### test_api
------
u32 test_api(void);
`u32 test_api(void);`
syscall id : 0
arguments : 0
résultat : oui (0x66666666)
*Description: function to test if the syscall mecanism is running.*
* syscall id : **0**
* arguments : **0**
* * argument 1 : **u32 none** *Afin de documenter un argument*
* results : **yes (always 0x66666666)**
------

28
BUGS.md Normal file
View File

@ -0,0 +1,28 @@
## Liste de BUGS à corriger
### VIDEO
* Interpolation des droites lorsques les coordonnées sortent de l'écran : erreur les coefficient directeur sont faux.
* Les modes VGA ne fonctionnent pas tous.
* Ralentissement lors du défilemment de la console en VESA.
### MEMOIRE
La commande mem plante parfois ?!
### 3D
La 3D utiliser sauvagement la mémoire sans malloc !!
### 2D
Le remplissage des triangles n'est pas parfais, 2 algo différents entre lignes et remplissage.
### SHELL
* La fonction regs est à reprendre...
* La fonction IDT est à adapter à la taille de l'écran

168
README.md
View File

@ -23,9 +23,9 @@ Sans système d'exploitation votre ordinateur est inopérant: c'est une boite vi
#### Comment utiliser COS2000 ?
COS2000 n'a pas pour but d'être utilisé en exploitation, c'est un système en cours de
développement. Vous pouvez néanmoins l'utiliser sur un ordinateur physique ou une machine virtuelle
afin de voir le fonctionnement d'un système d'exploitation rudimentatire. Voir compilation de COS2000...
COS2000 n'a pas pour but d'être utilisé en production. Il s'agit d'un système en cours de
développement que vous pouvez néanmoins tester sur un ordinateur physique ou de préférence sur une machine virtuelle.
Il est nécessaire de compiler le système avant de démarrer celui-ci à partir d'un périphérique amovible (clé usb).
#### Sur quel ordinateur fonctionne t'il ?
@ -41,6 +41,10 @@ COS2000 est sous licence LGPL v3.0, en simplifiant un peu :
* REUTILISER - OUI en citant l'auteur
* VENDRE - NON
Les détails se trouvent dans le fichier `LICENSE.md`
![logo](https://www.gnu.org/graphics/lgplv3-with-text-154x68.png)
### Compilation de COS2000
#### Avant la compilation
@ -57,23 +61,34 @@ Les numéros de version des logiciels sont données à titre indicatif car il es
Compilation:
* NASM version 2.11.08
* gcc version 5.4.0 20160609
* GNU Make version 4.1
* binutils version 2.26-8
Nom | Paquet | Version
--- | --- | ---
NASM | nasm | 2.11.08
gcc | gcc | 5.4.0 20160609
GNU Make | make | 4.1
Outils divers | binutils | 2.26-8
Images disques, débogage & émulation:
* fuse-umfuse-ext2 version 0.4 29
* fusefat version 0.1a-1.1
* CGDB: a curses debugger version 0.6.7
* QEMU emulator version 2.5.0
* OVMF version 0~20160408.ffea0a2c-2
* hexdump (bsdmainutils version 9.0.6)
* dd (coreutils version 8.25-2)
* tar version 1.28-2.1
* GNU indent version 2.2.11
* Bochs (optionnel)
Nom | Paquet | Version
--- | --- | ---
fuse-umfuse-ext2 | fuseext2 | 0.4 29
fusefat | fusefat | 0.1a-1.1
CGDB: a curses debugger | cgdb | 0.6.7
QEMU emulator | qemu | 2.5.0
OVMF | ovmf | 0~20160408.ffea0a2c-2
hexdump | bsdmainutils | 9.0.6
dd | coreutils | 8.25-2
tar | tar | 1.28-2.1
Bochs | bochs | 2.6
Suivi et développement:
Nom | Paquet | Version
--- | --- | ---
GNU indent | indent | 2.2.11
GIT | git | 2.7.4
Dos2unix | dos2unix| 6.0.4
##### Téléchargement de COS2000
@ -81,107 +96,112 @@ Afin de faciliter la mise à jour et le suivi des version de COS2000, GIT est ut
Si vous n'avez pas GIT, installez le avec la commande suivante :
```sudo apt-get install git```
`sudo apt-get install git`
Puis cloner le source chez vous avec la commande :
```git clone https://github.com/dahut87/cos2000.git```
`git clone https://github.com/dahut87/cos2000.git`
##### Installation des paquets nécessaires
Sous linux - Debian & Ubuntu like
```sudo apt-get install nasm gcc qemu fusefat fuseext2 cgdb ovmf bsdmainutils tar bsdmainutils indent binutils```
`sudo apt-get install nasm gcc qemu fusefat fuseext2 cgdb ovmf bsdmainutils tar bsdmainutils indent binutils`
ou sinon, depuis un terminal disposé sur le répertoire cos2000
```make install```
`make install`
#### Compilation
Commande de compilation de base
* ```make all``` compile tout le projet dans sa version disque dur et disque dur en UEFI
* `make all` compile tout le projet dans sa version disque dur et disque dur en UEFI
Autres commandes de compilation de COS2000
* ```make harddisk``` compile la version disque dur
* ```make uefi``` compile la version disque dur UEFI
* ```make bochstest``` lance l'émulation BOCHS en 32 bits sur disque dur
* ```make test``` lance l'émulation QEMU en 32 bits sur disque dur
* ```make test64``` lance l'émulation QEMU en 64 bits sur disque dur en UEFI
* ```make clean``` supprime les fichers compilés
* ```VESA=no make test``` préfixe à utiliser (VESA=no) pour faire appel au pilote VGA et non pas VESA
* `make harddisk` compile la version disque dur
* `make uefi` compile la version disque dur UEFI
* `make bochstest` lance l'émulation BOCHS en 32 bits sur disque dur
* `make test` lance l'émulation QEMU en 32 bits sur disque dur
* `make test64` lance l'émulation QEMU en 64 bits sur disque dur en UEFI
* `make clean` supprime les fichers compilés
* `VESA=no make test` préfixe à utiliser (VESA=no) pour faire appel au pilote VGA et non pas VESA
#### Utilisation
##### Sur un ordinateur émulé
Pour tester l'OS en émulation taper donc la commande ```make test``` qui compilera avant de lancer Qemu.
Pour tester l'OS en émulation taper donc la commande `make test` qui compilera avant de lancer Qemu.
##### Sur un ordinateur physique
Lancer une compilation du système COS2000
```make all```
`make all`
Puis, il faut copier l'image sur une clé (Attention l'opération effacera le contenu de la clé) :
```sudo dd if=./final/harddisk.img.final of=/dev/sdx bs=1M``` (ou sdx est votre périphérique)
`sudo dd if=./final/harddisk.img.final of=/dev/sdx bs=1M` (ou sdx est votre périphérique)
Bootez sur votre clé en mode bios (legacy).
Pour un boot en mode UEFI
```sudo dd if=./final/harddiskuefi.img.final of=/dev/sdx bs=1M``` (ou sdx est votre périphérique)
`sudo dd if=./final/harddiskuefi.img.final of=/dev/sdx bs=1M` (ou sdx est votre périphérique)
Pour connaitre le numéro de votre périphérique (clé)
```lsblk```
`lsblk`
##### Usage de COS2000
Pour l'instant quelques commandes seulement sont disponibles:
* REBOOT redémarre le PC,
* CLEAR efface l'écran,
* MODE change le mode video,
* DETECTCPU detecte et affiche les informations CPU,
* DETECTPCI detecte et affiche les périphériques PCI,
* TEST2D teste l'affichage graphique 2D,
* TEST3D teste l'affichage graphique 2D,
* REGS affiche les registres CPU,
* GDT affiche la table des descripteurs,
* IDT affiche la table des interruptions,
* MEM affiche les statistiques d'occupation memoire,
* INFO affiche des informations issues de GRUB,
* ERR génère une exception (ARGUMENTS),
* VIEW visionne la mémoire vive (ARGUMENTS),
* LOGO affiche le logo,
* FONT change la police d'affichage (ARGUMENTS),
* HELP affiche les commandes disponibles,
* BPSET met un point d'arrêt pour le débogueur (ARGUMENTS),
* BPCLR efface un point d'arrêt (ARGUMENTS),
* DISASM désassemble une portion de mémoire (ARGUMENTS),
* `REBOOT` redémarre le PC,
* `CLEAR` efface l'écran,
* `MODE` change le mode video,
* `DETECTCPU` detecte et affiche les informations CPU,
* `DETECTPCI` detecte et affiche les périphériques PCI,
* `TEST2D` teste l'affichage graphique 2D,
* `TEST3D` teste l'affichage graphique 2D,
* `REGS` affiche les registres CPU,
* `GDT` affiche la table des descripteurs,
* `IDT` affiche la table des interruptions,
* `MEM` affiche les statistiques d'occupation memoire,
* `INFO` affiche des informations issues de GRUB,
* `ERR` génère une exception (ARGUMENTS),
* `VIEW` visionne la mémoire vive (ARGUMENTS),
* `LOGO` affiche le logo,
* `FONT` change la police d'affichage (ARGUMENTS),
* `HELP` affiche les commandes disponibles,
* `BPSET` met un point d'arrêt pour le débogueur (ARGUMENTS),
* `BPCLR` efface un point d'arrêt (ARGUMENTS),
* `DISASM` désassemble une portion de mémoire (ARGUMENTS),
![COS2000 le 28-09-2018](https://github.com/dahut87/cos2000v2/raw/develop/Graphisme/screenshots/28-09-2018.png)
#### Organisation du dépôt
* debug - fichiers configuration débogueur
* final - img raw utilisables avec un émulateur des 3 versions
* * harddisk.img.final
* * harddiskuefi.img.final
* * floppy.img.final
* Graphisme - fichiers images
* * screenshots - screenshots de l'évolution du système
* * Thème - thème de démarrage COS2000 pour plymouth
* include - fichier d'entête C
* lib - librairies pour le noyau
* makefile - Makefile du projet
* programs - programme pour le domaine utilisateur (en cours)
* README.md - ce que vous lisez
* system - le noyau lui-même
* `debug` - fichiers configuration débogueur
* `final` - img raw utilisables avec un émulateur des 3 versions
* * `harddisk.img.final`
* * `harddiskuefi.img.final`
* * `floppy.img.final`
* `Graphisme` - fichiers images
* * `screenshots` - screenshots de l'évolution du système
* * `Thème` - thème de démarrage COS2000 pour plymouth
* `include` - fichier d'entête C
* `lib` - librairies pour le noyau
* `makefile` - Makefile du projet
* `programs` - programmes pour le domaine utilisateur
* * `include` - fichier d'entête C
* * `lib` - librairies pour le domaine utilisateur
* `README.md` - ce que vous lisez
* `LICENSE.md` - la licence LGPLv3.0
* `BUGS.md` - bugs rélevés dans le système
* `API.md` - Liste des APIs fournies par le système COS2000
* `system` - le noyau lui-même
### En savoir plus...
@ -201,10 +221,14 @@ Pour l'instant quelques commandes seulement sont disponibles:
* mode protégé limité à 4Go de mémoire vive (32 bits),
* gestion avancée de la mémoire (vmalloc).
#### A faire
#### En cours
* espace utilisateur et appels systèmes,
* ordonnanceur de tâche (par TSS),
* liste d'API automatiquement mise à jour,
#### A faire
* chargeur ELF32,
* pilote IDE/ATA (PIO mode),
* fonctions affichage image PNG,
@ -215,6 +239,12 @@ Pour l'instant quelques commandes seulement sont disponibles:
![COS2000 le 29-11-2018](https://github.com/dahut87/cos2000v2/raw/develop/Graphisme/screenshots/29-11-2018.png)
#### Autres Licences (autres auteurs)
Des fichiers sources utilisés par COS2000 sont sous d'autres licences, parmis ceux-ci figurent :
* `include/queues.h` sous licence Berkeley Software Distribution License
#### Historique du projet
* Version 2.2fr - C en mode protégé Reprise du projet
* Version 2.1fr - C en mode protégé Abandon du projet

View File

@ -5,13 +5,15 @@
#include "matrix.h"
#include "video.h"
typedef struct triface {
typedef struct triface
{
u16 V1;
u16 V2;
u16 V3;
} triface __attribute__ ((packed));
typedef struct model3d {
typedef struct model3d
{
u8 name[12];
matrix44 view;
vector4 *vertexlist;
@ -20,9 +22,12 @@ typedef struct model3d {
u16 facenb;
} model3d __attribute__ ((packed));
typedef struct vertex3d {
union {
struct {
typedef struct vertex3d
{
union
{
struct
{
float x;
float y;
float z;
@ -41,10 +46,12 @@ typedef enum type3D
} type3D __attribute__ ((packed));
void proj(vector4 list[], vertex2d plane[], vector4 origin[], u16 number, float factor);
void proj(vector4 list[], vertex2d plane[], vector4 origin[],
u16 number, float factor);
void cube(model3d * model, vector4 * origin, u16 size);
int load3ds(u8 * pointer, u32 size, model3d * model);
void show3dmodel(model3d *model, matrix44 *transformation, vector4 origin[], float factor, type3D type);
void show3dmodel(model3d * model, matrix44 * transformation,
vector4 origin[], float factor, type3D type);
/*******************************************************************************/
/* Fichier 3DS */

View File

@ -39,7 +39,8 @@
#define SEG_NORMAL 0b00010000 /* Segment normal pile/data/code (0 pour système) */
typedef struct gdtdes {
typedef struct gdtdes
{
u16 lim0_15;
u16 base0_15;
u8 base16_23;
@ -49,12 +50,14 @@ typedef struct gdtdes {
u8 base24_31;
} gdtdes __attribute__ ((packed));
struct gdtr {
struct gdtr
{
u16 limite;
u32 base;
} __attribute__ ((packed));
typedef struct tss {
typedef struct tss
{
u16 prevtask, reserved00;
u32 esp0;
u16 ss0, reserved0;
@ -76,7 +79,8 @@ typedef struct tss {
void inittr(void);
void initgdt(u32 offset);
void makegdtdes(u32 base, u32 limite, u8 acces, u8 flags, gdtdes *desc);
void makegdtdes(u32 base, u32 limite, u8 acces, u8 flags,
gdtdes * desc);
u32 getdesbase(u16 sel);
u8 getdestype(u16 sel);
u32 getdessize(u16 sel);

View File

@ -44,7 +44,8 @@
# define TIMER_MODE 0x43 /* port E/S pour le mode controle du timer */
# define RATE_GENERATOR 0x34 /* générateur de fréquence */
# define SQUARE_WAVE 0x36 /* générateur d'onde carrée */
#define TIMER_FREQ 1193180 /* fréquence pour timer dans un PC ou AT */
# define TIMER_FREQ 1193180
/* fréquence pour timer dans un PC ou AT */
# define HZ 100 /* Fréquence d'horloge (ajutste logiciellement sur IBM-PC) */
# define getESP(mem) ({ \
@ -210,7 +211,8 @@ lors d'un iret en mode kernel:
/* save pile */
typedef struct regs {
typedef struct regs
{
u64 efer;
u32 dr7;
u32 dr6;
@ -241,7 +243,8 @@ typedef struct regs {
} regs __attribute__ ((packed));
/* exception pile depuis code kernel*/
typedef struct exception_stack {
typedef struct exception_stack
{
u32 error_code;
u32 eip;
u32 cs;
@ -249,14 +252,16 @@ typedef struct exception_stack {
} exception_stack __attribute__ ((packed));
/* sans code erreur depuis code kernel*/
typedef struct exception_stack_noerror {
typedef struct exception_stack_noerror
{
u32 eip;
u32 cs;
u32 eflags;
} exception_stack_noerror __attribute__ ((packed));
/* exception pile depuis code user */
typedef struct exception_stack_user {
typedef struct exception_stack_user
{
u32 error_code;
u32 eip;
u32 cs;
@ -266,7 +271,8 @@ typedef struct exception_stack_user {
} exception_stack_user __attribute__ ((packed));
/* sans code erreu depuis code user */
typedef struct exception_stack_noerror_user {
typedef struct exception_stack_noerror_user
{
u32 eip;
u32 cs;
u32 eflags;
@ -276,7 +282,8 @@ typedef struct exception_stack_noerror_user {
/* descripteur de segment */
typedef struct idtdes {
typedef struct idtdes
{
u16 offset0_15;
u16 select;
u16 type;
@ -284,7 +291,8 @@ typedef struct idtdes {
} idtdes __attribute__ ((packed));
struct idtr {
struct idtr
{
u16 limite;
u32 base;
} __attribute__ ((packed));
@ -299,4 +307,3 @@ struct idtr {
void disableirq(u8 irq);
void cpuerror(const u8 * src, const regs * stack);
#endif

View File

@ -25,6 +25,7 @@ u32 rand(void);
void randomize(void);
u8 log2(u64 n);
u8 log10(u64 n);
unsigned long long __udivdi3 (unsigned long long num, unsigned long long den);
unsigned long long __udivdi3(unsigned long long num,
unsigned long long den);
unsigned long long __umoddi3(unsigned long long n, unsigned long long d);
u32 pow(u32 a, u8 n);

View File

@ -5,9 +5,12 @@
#ifndef MATRIX
# define MATRIX
typedef struct vector4{
union {
struct {
typedef struct vector4
{
union
{
struct
{
float x;
float y;
float z;
@ -17,9 +20,12 @@ typedef struct vector4{
};
} vector4 __attribute__ ((packed));
typedef struct matrix44{
union {
struct {
typedef struct matrix44
{
union
{
struct
{
vector4 V[4];
};
float v[16];
@ -44,14 +50,16 @@ float vector4_dotproduct(vector4 v1, vector4 v2);
float vector4_norm(vector4 src);
float vector4_distance(vector4 v1, vector4 v2);
int vector4_isequals(vector4 v1, vector4 v2);
void vector4_planenormal(vector4 v1, vector4 v2, vector4 v3, vector4 *dst);
void vector4_planenormal(vector4 v1, vector4 v2, vector4 v3,
vector4 * dst);
void matrix44_homogen(matrix44 * matrix);
void matrix44_empty(matrix44 * matrix);
void matrix44_scaling(vector4 v, matrix44 * dst);
void matrix44_translation(vector4 v, matrix44 * dst);
void matrix44_scale(matrix44 * dst, float factor);
void matrix44_scale_translation(vector4 scale, vector4 translation, matrix44 *dst);
void matrix44_scale_translation(vector4 scale, vector4 translation,
matrix44 * dst);
void matrix44_rotation_x(float angle, matrix44 * dst);
void matrix44_rotation_y(float angle, matrix44 * dst);
void matrix44_rotation_z(float angle, matrix44 * dst);
@ -59,18 +67,15 @@ void matrix44_rotation(vector4 axis, float angle, matrix44 *dst);
void matrix44_multiply(matrix44 * m1, matrix44 * m2, matrix44 * dst);
void matrix44_transform(matrix44 * matrix, vector4 * dst);
float matrix44_determinant(matrix44 * matrix);
float todeterminant(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3);
float todeterminant(float a1, float a2, float a3, float b1, float b2,
float b3, float c1, float c2, float c3);
void matrix44_adjoint(matrix44 * matrix);
void matrix44_show(matrix44 * matrix);
void matrix44_invert(matrix44 * matrix);
void matrix44_transpose(matrix44 * matrix);
void matrix44_lookat(vector4 eye, vector4 dst, vector4 up, matrix44 *matrix);
void matrix44_lookat(vector4 eye, vector4 dst, vector4 up,
matrix44 * matrix);
int matrix44_isequals(matrix44 * m1, matrix44 * m2);
float *toarray(matrix44 * m);
#endif

View File

@ -12,20 +12,27 @@
# define TOPT(addr) ((addr) & 0x003FF000) >> 12
# define TOPG(addr) (addr) & 0x00000FFF
#define PAGESIZE 4096 /* Taille d'une page */
#define PAGENUMBER 1024 /* Nombre de pages */
# define PAGESIZE 4096
/* Taille d'une page */
# define PAGENUMBER 1024
/* Nombre de pages */
# define KERNELSIZE PAGESIZE*PAGENUMBER*2 /* 2 pages de 4mo en identity mapping */
# define IDT_ADDR 0x00000000 /* adresse de la IDT */
# define GDT_ADDR 0x00000800 /* adresse de la GDT */
#define KERNEL_PD_ADDR 0x00001000 /* adresse de la page directory */
#define KERNEL_STACK_ADDR 0x0009FFFF /* adresse de la pile du kernel */
#define KERNEL_CODE_ADDR 0x00100000 /* adresse du code du noyau */
# define KERNEL_PD_ADDR 0x00001000
/* adresse de la page directory */
# define KERNEL_STACK_ADDR 0x0009FFFF
/* adresse de la pile du kernel */
# define KERNEL_CODE_ADDR 0x00100000
/* adresse du code du noyau */
# define KERNEL_PAGES 0x00800000 /* adresse des pages */
# define KERNEL_HEAP 0x10000000 /* adresse du heap */
# define VESA_FBMEM 0x38000000 /* adresse du framebuffer VESA */
#define USER_CODE 0x40000000 /* adresse du code utilisateur */
#define USER_STACK 0xE0000000 /* adresse de la pile utilisateur */
# define USER_CODE 0x40000000
/* adresse du code utilisateur */
# define USER_STACK 0xE0000000
/* adresse de la pile utilisateur */
/* limites de la mémoire 32 bits */
# define MAXMEMSIZE 0x100000000
@ -60,13 +67,15 @@
asm volatile ("mov %[memaddr], %%eax; mov %%eax, %%cr3"::[memaddr] "m" (addr) );
/* Malloc, pour l'attribution de mémoire en heap */
typedef struct tmalloc {
typedef struct tmalloc
{
u32 size:31;
u32 used:1;
} __attribute__ ((packed)) tmalloc;
/* Page, pour la gestion de la mémoire virtuelle */
typedef struct page {
typedef struct page
{
u8 *vaddr;
u8 *paddr;
TAILQ_ENTRY(page) tailq;
@ -75,13 +84,15 @@ typedef struct page {
typedef TAILQ_HEAD(page_s, page) page_t;
/* Page directory, pour la gestion de la mémoire virtuelle */
typedef struct pd {
typedef struct pd
{
page *addr;
page_t page_head;
} __attribute__ ((packed)) pd;
/* vaddrrange, pour la gestion des pages de la mémoire virtuelle */
typedef struct vrange {
typedef struct vrange
{
u8 *vaddrlow;
u8 *vaddrhigh;
TAILQ_ENTRY(vrange) tailq;
@ -113,7 +124,8 @@ void virtual_page_free(u8* vaddr);
u8 *virtual_to_physical(u8 * vaddr);
void virtual_pd_page_remove(u8 * vaddr);
void virtual_pd_page_add(pd * dst, u8 * vaddr, u8 * paddr, u32 flags);
void virtual_range_use(pd *dst, u8 *vaddr, u8 *paddr, u64 len, u32 flags);
void virtual_range_use(pd * dst, u8 * vaddr, u8 * paddr, u64 len,
u32 flags);
void virtual_range_free(pd * dst, u8 * vaddr, u64 len);
void virtual_range_new(pd * dst, u8 * vaddr, u64 len, u32 flags);
void malloc_init(void);

View File

@ -4,7 +4,8 @@
typedef struct pciclass {
typedef struct pciclass
{
u16 number;
u8 *name;
} pciclass __attribute__ ((packed));
@ -26,9 +27,12 @@ typedef struct pcidev
} pcidev __attribute__ ((packed));
typedef struct pcidevmini {
union {
struct {
typedef struct pcidevmini
{
union
{
struct
{
u16 vendor_id;
u16 device_id;
};
@ -36,9 +40,11 @@ typedef struct pcidevmini {
};
} pcidevmini __attribute__ ((packed));
u16 pciConfigReadWord(const u8 bus, const u8 dev, const u8 function, const u8 offset);
u16 pciConfigReadWord(const u8 bus, const u8 dev, const u8 function,
const u8 offset);
void scanPCImini(void);
pcidevmini getPCImininfo(const u8 bus, const u8 dev, const u8 function);
bool getPCInfo(pcidev *device, const u8 bus, const u8 dev, const u8 function);
bool getPCInfo(pcidev * device, const u8 bus, const u8 dev,
const u8 function);
void scanPCI(void);
u8 *pcigetclassname(const pcidev * device);

View File

@ -88,7 +88,8 @@
#define ELFOSABI_COS2000 16 //COS2000
/* ELF header */
typedef struct elf32 {
typedef struct elf32
{
u8 e_ident[EI_NIDENT];
u16 e_type;
u16 e_machine;
@ -105,7 +106,8 @@ typedef struct elf32 {
u16 e_shstrndx;
} elf32;
typedef struct elf32p{
typedef struct elf32p
{
u32 p_type;
u32 p_offset;
u8 *p_vaddr;
@ -117,13 +119,15 @@ typedef struct elf32p{
} elf32p;
typedef struct stackdef {
typedef struct stackdef
{
u32 esp0;
u16 ss0;
} stackdef __attribute__ ((packed));
typedef struct process {
typedef struct process
{
u32 pid;
bool kernel;
regs dump;

View File

@ -108,7 +108,8 @@
*/
# ifdef QUEUE_MACRO_DEBUG
/* Store the last 2 places the queue element or head was altered */
struct qm_trace {
struct qm_trace
{
unsigned long lastline;
unsigned long prevline;
const char *lastfile;
@ -141,7 +142,8 @@ struct qm_trace {
# define TRACEBUF
# define TRACEBUF_INITIALIZER
# define TRASHIT(x)
#endif /* QUEUE_MACRO_DEBUG */
# endif
/* QUEUE_MACRO_DEBUG */
/*
* Singly-linked List declarations.
@ -401,7 +403,8 @@ struct { \
# define QMD_LIST_CHECK_HEAD(head, field)
# define QMD_LIST_CHECK_NEXT(elm, field)
# define QMD_LIST_CHECK_PREV(elm, field)
#endif /* (_KERNEL && INVARIANTS) */
# endif
/* (_KERNEL && INVARIANTS) */
# define LIST_EMPTY(head) ((head)->lh_first == NULL)
@ -537,7 +540,8 @@ struct { \
# define QMD_TAILQ_CHECK_TAIL(head, headname)
# define QMD_TAILQ_CHECK_NEXT(elm, field)
# define QMD_TAILQ_CHECK_PREV(elm, field)
#endif /* (_KERNEL && INVARIANTS) */
# endif
/* (_KERNEL && INVARIANTS) */
# define TAILQ_CONCAT(head1, head2, field) do { \
if (!TAILQ_EMPTY(head2)) { \

View File

@ -5,8 +5,7 @@ typedef struct command
{
u8 name[64];
u8 params[64];
int (*function)()
} command __attribute__ ((packed));
int (*function) ()} command __attribute__ ((packed));
int rebootnow();
int test2d();

View File

@ -1,3 +1,4 @@
/*******************************************************************************/
/* COS2000 - Compatible Operating System - LGPL v3 - Hordé Nicolas */
/* */extern restart;
/* */
extern restart;

View File

@ -13,7 +13,8 @@ u8 VESA_setvideo_mode (u8 mode);
u8 *VESA_getvideo_drivername(void);
u8 *VESA_getvideo_capabilities(void);
videoinfos *VESA_getvideo_info(void);
u32 VESA_mem_to_video (void *src,u32 dst, u32 size, bool increment_src);
u32 VESA_mem_to_video(void *src, u32 dst, u32 size,
bool increment_src);
u32 VESA_video_to_mem(u32 src, void *dst, u32 size);
u32 VESA_video_to_video(u32 src, u32 dst, u32 size);
void VESA_wait_vretrace(void);
@ -22,8 +23,7 @@ void VESA_page_set (u8 page);
void VESA_page_show(u8 page);
void VESA_dummy();
static videofonction vesafonctions =
{
static videofonction vesafonctions = {
&VESA_remap_memory,
&VESA_detect_hardware,
&VESA_setvideo_mode,

View File

@ -23,11 +23,13 @@
#define PLANESIZE 0x10000
/* Registres VGA */
typedef struct misc_regs {
typedef struct misc_regs
{
u8 Miscellaneous_Output_Register;
} misc_regs __attribute__ ((packed));
typedef struct sequencer_regs {
typedef struct sequencer_regs
{
u8 Reset_Register;
u8 Clocking_Mode_Register;
u8 Map_Mask_Register;
@ -35,7 +37,8 @@ typedef struct sequencer_regs {
u8 Sequencer_Memory_Mode_Register;
} sequencer_regs __attribute__ ((packed));
typedef struct crtc_regs {
typedef struct crtc_regs
{
u8 Horizontal_Total_Register;
u8 End_Horizontal_Display_Register;
u8 Start_Horizontal_Blanking_Register;
@ -63,7 +66,8 @@ typedef struct crtc_regs {
u8 Line_Compare_Register;
} crtc_regs __attribute__ ((packed));
typedef struct graphics_regs {
typedef struct graphics_regs
{
u8 Set_Reset_Register;
u8 Enable_Set_Reset_Register;
u8 Color_Compare_Register;
@ -75,7 +79,8 @@ typedef struct graphics_regs {
u8 Bit_Mask_Register;
} graphics_regs __attribute__ ((packed));
typedef struct attributs_regs {
typedef struct attributs_regs
{
u8 Palette_Registers[16];
u8 Attribute_Mode_Control_Register;
u8 Overscan_Color_Register;
@ -84,7 +89,8 @@ typedef struct attributs_regs {
u8 Color_Select_Register;
} attributs_regs __attribute__ ((packed));
typedef struct vgamode {
typedef struct vgamode
{
misc_regs misc;
sequencer_regs sequencer;
crtc_regs ctrc;
@ -116,8 +122,7 @@ void VGA_font2_set (u8 num);
void VGA_blink_enable(void);
void VGA_blink_disable(void);
static videofonction vgafonctions =
{
static videofonction vgafonctions = {
&VGA_remap_memory,
&VGA_detect_hardware,
&VGA_setvideo_mode,

View File

@ -10,18 +10,21 @@
# define MAXDRIVERS 10
# define MAXFONTS 10
typedef struct vertex2d{
typedef struct vertex2d
{
s16 x;
s16 y;
} vertex2d __attribute__ ((packed));
typedef struct rgbcolor {
typedef struct rgbcolor
{
u8 R;
u8 G;
u8 B;
} rgbcolor __attribute__ ((packed));
typedef struct videoinfos {
typedef struct videoinfos
{
u8 currentmode;
u16 currentwidth;
u16 currentheight;
@ -41,7 +44,8 @@ typedef struct videoinfos {
u32 baseaddress;
} videoinfos __attribute__ ((packed));
typedef struct videofonction {
typedef struct videofonction
{
void (*remap_memory) ();
u8 *(*detect_hardware) ();
u8(*setvideo_mode) ();
@ -66,19 +70,22 @@ typedef struct videofonction {
void (*blink_disable) ();
} videofonction __attribute__ ((packed));
typedef struct drivers {
typedef struct drivers
{
u8 *nom;
videofonction *pointer;
} drivers __attribute__ ((packed));
typedef struct font {
typedef struct font
{
u8 nom[8];
u8 *pointer;
u8 width;
u8 height;
} font __attribute__ ((packed));
typedef struct capabilities {
typedef struct capabilities
{
u8 modenumber;
u16 width;
u16 height;
@ -87,7 +94,8 @@ typedef struct capabilities {
u8 refresh;
} capabilities __attribute__ ((packed));
typedef struct console {
typedef struct console
{
u8 attrib;
s16 cursX;
s16 cursY;
@ -115,7 +123,8 @@ void changemode(u8 mode);
u32 egatorgb(u8 ega);
u8 egatovga(u8 ega);
void v_line(vertex2d * A, vertex2d * B, u32 color);
void trianglefilled(vertex2d *A, vertex2d *B, vertex2d *C, u32 color);
void trianglefilled(vertex2d * A, vertex2d * B, vertex2d * C,
u32 color);
void triangle(vertex2d * A, vertex2d * B, vertex2d * C, u32 color);
/* Fonctions de console */
@ -134,13 +143,15 @@ u32 sprintf(u8 *variable, const u8 *string, ...);
u32 snprintf(u8 * variable, u32 maxsize, const u8 * string, ...);
u32 vprintf(const u8 * string, va_list args);
u32 vsprintf(u8 * variable, const u8 * string, va_list args);
u32 vsnprintf(u8 *variable, u32 maxsize, const u8 *string, va_list args);
u32 vsnprintf(u8 * variable, u32 maxsize, const u8 * string,
va_list args);
u8 *itoa(u64 num, u8 * str, u8 base, u64 dim, u8 achar);
u8 *sitoa(u64 num, u8 * str, u64 dim);
u8 *rtoadouble(double num, u8 * str, u8 precisioni, u8 precisionf);
u8 *rtoasingle(float num, u8 * str, u8 precisioni, u8 precisionf);
u32 format(const u8 * string, va_list args, u32 maxsize, u32 (*fonction)(u8* src, u8** dest, u32 len), u8* dest);
u32 format(const u8 * string, va_list args, u32 maxsize,
u32(*fonction) (u8 * src, u8 ** dest, u32 len), u8 * dest);
/* Fonction pour gérer le pilote */
void initdriver();

51342
lib/3D/man.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,12 +8,17 @@
/*******************************************************************************/
/* Crée une projection simple pour test */
void proj(vector4 list[], vertex2d plane[], vector4 origin[], u16 number, float factor)
void proj(vector4 list[], vertex2d plane[], vector4 origin[], u16 number,
float factor)
{
for (u32 i = 0; i < number; i++)
{
plane[i].x=(int)((list[i].x*factor)/(list[i].z+origin->z)+origin->x);
plane[i].y=(int)((list[i].y*factor)/(list[i].z+origin->z)+origin->y);
plane[i].x =
(int) ((list[i].x * factor) /
(list[i].z + origin->z) + origin->x);
plane[i].y =
(int) ((list[i].y * factor) /
(list[i].z + origin->z) + origin->y);
}
}
@ -99,7 +104,8 @@ void cube(model3d *model, vector4 *origin, u16 size)
/*******************************************************************************/
/* Affiche un modèle 3D */
void show3dmodel(model3d *model, matrix44 *transformation, vector4 origin[], float factor, type3D type)
void show3dmodel(model3d * model, matrix44 * transformation,
vector4 origin[], float factor, type3D type)
{
u16 i;
vertex2d *plane = 0x00250000;
@ -108,17 +114,26 @@ void show3dmodel(model3d *model, matrix44 *transformation, vector4 origin[], flo
matrix44_transform(transformation, &model->vertexlist[i]);
}
proj(model->vertexlist, plane, origin, model->vertexnb, factor);
switch (type) {
switch (type)
{
case TYPE3D_POINTS:
for(i=0;i<model->vertexnb;i++) {
for (i = 0; i < model->vertexnb; i++)
{
v_writepxl(&plane[i], egatorgb(4));
}
break;
case TYPE3D_LINES:
for(i=0;i<model->facenb;i++) {
v_line(&plane[model->facelist[i].V1], &plane[model->facelist[i].V2], egatorgb(4));
v_line(&plane[model->facelist[i].V1], &plane[model->facelist[i].V3], egatorgb(4));
v_line(&plane[model->facelist[i].V2], &plane[model->facelist[i].V3], egatorgb(4));
for (i = 0; i < model->facenb; i++)
{
v_line(&plane[model->facelist[i].V1],
&plane[model->facelist[i].V2],
egatorgb(4));
v_line(&plane[model->facelist[i].V1],
&plane[model->facelist[i].V3],
egatorgb(4));
v_line(&plane[model->facelist[i].V2],
&plane[model->facelist[i].V3],
egatorgb(4));
}
break;
case TYPE3D_FACES:
@ -143,7 +158,8 @@ int load3ds(u8 *pointer,u32 size, model3d *model)
u16 *listunsigned;
dsState state = DS_READ_CHUNK_ID;
bool dsfile = false;
while(ptr-pointer<size) {
while (ptr - pointer < size)
{
switch (state)
{
case DS_READ_CHUNK_ID:
@ -180,7 +196,8 @@ int load3ds(u8 *pointer,u32 size, model3d *model)
state = DS_READ_MATRIX;
break;
default:
if (!dsfile) return 1;
if (!dsfile)
return 1;
ptr += (chunk_size - 6);
state = DS_READ_CHUNK_ID;
break;
@ -204,9 +221,12 @@ int load3ds(u8 *pointer,u32 size, model3d *model)
model->vertexlist = 0x00300000;
while (i < model->vertexnb)
{
model->vertexlist[i].x=*(listfloat++);
model->vertexlist[i].y=*(listfloat++);
model->vertexlist[i].z=*(listfloat++);
model->vertexlist[i].x =
*(listfloat++);
model->vertexlist[i].y =
*(listfloat++);
model->vertexlist[i].z =
*(listfloat++);
model->vertexlist[i++].w = 1.0;
}
ptr = listfloat;
@ -223,9 +243,12 @@ int load3ds(u8 *pointer,u32 size, model3d *model)
model->facelist = 0x00400000;
while (i < model->facenb)
{
model->facelist[i].V1=*(listunsigned++);
model->facelist[i].V2=*(listunsigned++);
model->facelist[i++].V3=*(listunsigned++);
model->facelist[i].V1 =
*(listunsigned++);
model->facelist[i].V2 =
*(listunsigned++);
model->facelist[i++].V3 =
*(listunsigned++);
listunsigned++;
}
ptr = listunsigned;
@ -236,9 +259,12 @@ int load3ds(u8 *pointer,u32 size, model3d *model)
listfloat = ptr;
while (i < 4)
{
model->view.V[i].x=*(listfloat++);
model->view.V[i].y=*(listfloat++);
model->view.V[i].z=*(listfloat++);
model->view.V[i].x =
*(listfloat++);
model->view.V[i].y =
*(listfloat++);
model->view.V[i].z =
*(listfloat++);
model->view.V[i++].w = 0.0f;
}
model->view.V[3].w = 1.0f;
@ -252,4 +278,3 @@ int load3ds(u8 *pointer,u32 size, model3d *model)
}
}

View File

@ -163,9 +163,12 @@ static pciclass crypto[] = {
static pciclass dasp[] = {
{0x00, "Data Acquisition and Signal Processing Controller, DPIO"},
{ 0x01, "Data Acquisition and Signal Processing Controller, Performance Counter" },
{ 0x10, "Data Acquisition and Signal Processing Controller, Communications Synchronization" },
{ 0x20, "Data Acquisition and Signal Processing Controller, Management Card" },
{0x01,
"Data Acquisition and Signal Processing Controller, Performance Counter"},
{0x10,
"Data Acquisition and Signal Processing Controller, Communications Synchronization"},
{0x20,
"Data Acquisition and Signal Processing Controller, Management Card"},
{0x80, "Data Acquisition and Signal Processing Controller, Other"},
{0, NULL}
};
@ -191,4 +194,3 @@ static pciclass *classcodes[] = {
dasp,
[255] = NULL
};

View File

@ -4,192 +4,379 @@ Programme de test compilé en mode USER avec SYSCALL, le binaire est intégré a
#include "types.h"
u8 programs_test[] = {
0x7f, 0x45, 0x4c, 0x46, 0x01, 0x01, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0xe4, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x20, 0x00, 0x02, 0x00, 0x28, 0x00,
0x0c, 0x00, 0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x00,
0xa0, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x51, 0xe5, 0x74, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x8d, 0x4c, 0x24, 0x04,
0x83, 0xe4, 0xf0, 0xff, 0x71, 0xfc, 0x55, 0x89, 0xe5, 0x51, 0x83, 0xec,
0x04, 0xe8, 0x0a, 0x00, 0x00, 0x00, 0x90, 0x83, 0xc4, 0x04, 0x59, 0x5d,
0x8d, 0x61, 0xfc, 0xc3, 0x55, 0x89, 0xe5, 0x83, 0xec, 0x10, 0xb8, 0x00,
0x00, 0x00, 0x00, 0x89, 0xe1, 0xba, 0x34, 0x00, 0x00, 0x40, 0x0f, 0x34,
0x89, 0x45, 0xfc, 0x90, 0xc9, 0xc3, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x7a, 0x52, 0x00, 0x01, 0x7c, 0x08, 0x01,
0x1b, 0x0c, 0x04, 0x04, 0x88, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
0x1c, 0x00, 0x00, 0x00, 0xa4, 0xff, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00,
0x00, 0x44, 0x0c, 0x01, 0x00, 0x47, 0x10, 0x05, 0x02, 0x75, 0x00, 0x43,
0x0f, 0x03, 0x75, 0x7c, 0x06, 0x4d, 0xc1, 0x0c, 0x01, 0x00, 0x41, 0xc5,
0x43, 0x0c, 0x04, 0x04, 0x1c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x98, 0xff, 0xff, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e, 0x08,
0x85, 0x02, 0x42, 0x0d, 0x05, 0x56, 0xc5, 0x0c, 0x04, 0x04, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01,
0x86, 0x00, 0x00, 0x00, 0x0c, 0x38, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x02, 0x01, 0x06, 0x33, 0x00, 0x00, 0x00, 0x02, 0x02, 0x05, 0x3f,
0x00, 0x00, 0x00, 0x03, 0x04, 0x05, 0x69, 0x6e, 0x74, 0x00, 0x02, 0x08,
0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x05, 0x05, 0x00, 0x00, 0x00,
0x02, 0x01, 0x06, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x2a, 0x00,
0x00, 0x00, 0x02, 0x02, 0x07, 0x49, 0x00, 0x00, 0x00, 0x02, 0x04, 0x07,
0x18, 0x00, 0x00, 0x00, 0x02, 0x08, 0x07, 0x13, 0x00, 0x00, 0x00, 0x02,
0x04, 0x07, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x0e, 0x00, 0x00, 0x00, 0x01,
0x08, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x01, 0x9c, 0x00,
0xa7, 0x00, 0x00, 0x00, 0x04, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04, 0x01,
0xe9, 0x00, 0x00, 0x00, 0x0c, 0x57, 0x01, 0x00, 0x00, 0x67, 0x01, 0x00,
0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00,
0x00, 0x02, 0x01, 0x06, 0x33, 0x00, 0x00, 0x00, 0x02, 0x02, 0x05, 0x3f,
0x00, 0x00, 0x00, 0x03, 0x04, 0x05, 0x69, 0x6e, 0x74, 0x00, 0x02, 0x08,
0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x05, 0x05, 0x00, 0x00, 0x00,
0x02, 0x01, 0x06, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x2a, 0x00,
0x00, 0x00, 0x02, 0x02, 0x07, 0x49, 0x00, 0x00, 0x00, 0x02, 0x04, 0x07,
0x18, 0x00, 0x00, 0x00, 0x02, 0x08, 0x07, 0x13, 0x00, 0x00, 0x00, 0x04,
0x75, 0x33, 0x32, 0x00, 0x02, 0x1d, 0x76, 0x00, 0x00, 0x00, 0x02, 0x04,
0x07, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x5e, 0x01, 0x00, 0x00, 0x01, 0x09,
0x6b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00,
0x01, 0x9c, 0x06, 0x26, 0x00, 0x00, 0x40, 0x11, 0x00, 0x00, 0x00, 0x07,
0x5f, 0x76, 0x00, 0x01, 0x0b, 0x6b, 0x00, 0x00, 0x00, 0x02, 0x91, 0x74,
0x00, 0x00, 0x00, 0x01, 0x11, 0x01, 0x25, 0x0e, 0x13, 0x0b, 0x03, 0x0e,
0x1b, 0x0e, 0x11, 0x01, 0x12, 0x06, 0x10, 0x17, 0x00, 0x00, 0x02, 0x24,
0x00, 0x0b, 0x0b, 0x3e, 0x0b, 0x03, 0x0e, 0x00, 0x00, 0x03, 0x24, 0x00,
0x0b, 0x0b, 0x3e, 0x0b, 0x03, 0x08, 0x00, 0x00, 0x04, 0x2e, 0x00, 0x3f,
0x19, 0x03, 0x0e, 0x3a, 0x0b, 0x3b, 0x0b, 0x27, 0x19, 0x11, 0x01, 0x12,
0x06, 0x40, 0x18, 0x96, 0x42, 0x19, 0x00, 0x00, 0x00, 0x01, 0x11, 0x01,
0x25, 0x0e, 0x13, 0x0b, 0x03, 0x0e, 0x1b, 0x0e, 0x11, 0x01, 0x12, 0x06,
0x10, 0x17, 0x00, 0x00, 0x02, 0x24, 0x00, 0x0b, 0x0b, 0x3e, 0x0b, 0x03,
0x0e, 0x00, 0x00, 0x03, 0x24, 0x00, 0x0b, 0x0b, 0x3e, 0x0b, 0x03, 0x08,
0x00, 0x00, 0x04, 0x16, 0x00, 0x03, 0x08, 0x3a, 0x0b, 0x3b, 0x0b, 0x49,
0x13, 0x00, 0x00, 0x05, 0x2e, 0x01, 0x3f, 0x19, 0x03, 0x0e, 0x3a, 0x0b,
0x3b, 0x0b, 0x27, 0x19, 0x49, 0x13, 0x11, 0x01, 0x12, 0x06, 0x40, 0x18,
0x97, 0x42, 0x19, 0x00, 0x00, 0x06, 0x0b, 0x01, 0x11, 0x01, 0x12, 0x06,
0x00, 0x00, 0x07, 0x34, 0x00, 0x03, 0x08, 0x3a, 0x0b, 0x3b, 0x0b, 0x49,
0x13, 0x02, 0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x02, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00,
0x00, 0x00, 0x02, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x01, 0xfb, 0x0e,
0x0d, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x01, 0x00, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x05, 0x02, 0x00, 0x00, 0x00, 0x40, 0x1a, 0x08, 0x13, 0x59,
0x02, 0x0a, 0x00, 0x01, 0x01, 0x4b, 0x00, 0x00, 0x00, 0x02, 0x00, 0x33,
0x00, 0x00, 0x00, 0x01, 0x01, 0xfb, 0x0e, 0x0d, 0x00, 0x01, 0x01, 0x01,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x2e, 0x2e, 0x2f, 0x69,
0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x00, 0x00, 0x6c, 0x69, 0x62, 0x63,
0x2e, 0x63, 0x00, 0x00, 0x00, 0x00, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e,
0x68, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x20, 0x00, 0x00,
0x40, 0x03, 0x09, 0x01, 0x67, 0x08, 0x13, 0x02, 0x03, 0x00, 0x01, 0x01,
0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x69, 0x6e,
0x74, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x6c, 0x6f, 0x6e, 0x67, 0x20,
0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65,
0x64, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e,
0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x00, 0x74, 0x65, 0x73, 0x74,
0x2e, 0x63, 0x00, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20, 0x69, 0x6e, 0x74,
0x00, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20, 0x75, 0x6e, 0x73, 0x69, 0x67,
0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x2f, 0x68, 0x6f, 0x6d,
0x65, 0x2f, 0x68, 0x6f, 0x72, 0x64, 0x65, 0x2f, 0x42, 0x75, 0x72, 0x65,
0x61, 0x75, 0x2f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x2f, 0x63, 0x6f, 0x73,
0x32, 0x30, 0x30, 0x30, 0x2f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d,
0x73, 0x00, 0x47, 0x4e, 0x55, 0x20, 0x43, 0x31, 0x31, 0x20, 0x35, 0x2e,
0x34, 0x2e, 0x30, 0x20, 0x32, 0x30, 0x31, 0x36, 0x30, 0x36, 0x30, 0x39,
0x20, 0x2d, 0x6d, 0x33, 0x32, 0x20, 0x2d, 0x6d, 0x74, 0x75, 0x6e, 0x65,
0x3d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x2d, 0x6d, 0x61,
0x72, 0x63, 0x68, 0x3d, 0x69, 0x36, 0x38, 0x36, 0x20, 0x2d, 0x67, 0x20,
0x2d, 0x4f, 0x30, 0x20, 0x2d, 0x66, 0x66, 0x72, 0x65, 0x65, 0x73, 0x74,
0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x2d, 0x66, 0x6e, 0x6f, 0x2d,
0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x20, 0x2d, 0x66, 0x6e, 0x6f,
0x2d, 0x70, 0x69, 0x65, 0x00, 0x47, 0x4e, 0x55, 0x20, 0x43, 0x31, 0x31,
0x20, 0x35, 0x2e, 0x34, 0x2e, 0x30, 0x20, 0x32, 0x30, 0x31, 0x36, 0x30,
0x36, 0x30, 0x39, 0x20, 0x2d, 0x46, 0x65, 0x6c, 0x66, 0x2d, 0x69, 0x33,
0x38, 0x36, 0x20, 0x2d, 0x6d, 0x33, 0x32, 0x20, 0x2d, 0x6d, 0x74, 0x75,
0x6e, 0x65, 0x3d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x2d,
0x6d, 0x61, 0x72, 0x63, 0x68, 0x3d, 0x69, 0x36, 0x38, 0x36, 0x20, 0x2d,
0x67, 0x20, 0x2d, 0x4f, 0x30, 0x20, 0x2d, 0x66, 0x66, 0x72, 0x65, 0x65,
0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x2d, 0x66, 0x6e,
0x6f, 0x2d, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x20, 0x2d, 0x66,
0x6e, 0x6f, 0x2d, 0x70, 0x69, 0x65, 0x00, 0x6c, 0x69, 0x62, 0x63, 0x2e,
0x63, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x00, 0x2f,
0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x64, 0x65, 0x2f, 0x42,
0x75, 0x72, 0x65, 0x61, 0x75, 0x2f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x2f,
0x63, 0x6f, 0x73, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x70, 0x72, 0x6f, 0x67,
0x72, 0x61, 0x6d, 0x73, 0x2f, 0x6c, 0x69, 0x62, 0x00, 0x47, 0x43, 0x43,
0x3a, 0x20, 0x28, 0x55, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x20, 0x35, 0x2e,
0x34, 0x2e, 0x30, 0x2d, 0x36, 0x75, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x31,
0x7e, 0x31, 0x36, 0x2e, 0x30, 0x34, 0x2e, 0x31, 0x30, 0x29, 0x20, 0x35,
0x2e, 0x34, 0x2e, 0x30, 0x20, 0x32, 0x30, 0x31, 0x36, 0x30, 0x36, 0x30,
0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf1, 0xff, 0x08, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf1, 0xff,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00,
0x12, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40,
0x1a, 0x00, 0x00, 0x00, 0x12, 0x00, 0x01, 0x00, 0x00, 0x74, 0x65, 0x73,
0x74, 0x2e, 0x63, 0x00, 0x6c, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x00, 0x6d,
0x61, 0x69, 0x6e, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69,
0x00, 0x00, 0x2e, 0x73, 0x79, 0x6d, 0x74, 0x61, 0x62, 0x00, 0x2e, 0x73,
0x74, 0x72, 0x74, 0x61, 0x62, 0x00, 0x2e, 0x73, 0x68, 0x73, 0x74, 0x72,
0x74, 0x61, 0x62, 0x00, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x00, 0x2e, 0x65,
0x68, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x2e, 0x64, 0x65, 0x62,
0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x00, 0x2e, 0x64, 0x65, 0x62,
0x75, 0x67, 0x5f, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x00, 0x2e, 0x64,
0x65, 0x62, 0x75, 0x67, 0x5f, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73,
0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6c, 0x69, 0x6e, 0x65,
0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x00,
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x74, 0x00, 0x00, 0x00,
0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x40,
0xb0, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x00, 0x2f, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x02, 0x00, 0x00,
0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xee, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2e, 0x03, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x03, 0x00, 0x00,
0x95, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x49, 0x05, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x6d, 0x06, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00,
0xd0, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x50, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x7f, 0x45, 0x4c, 0x46, 0x01, 0x01, 0x01, 0x10, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0xe4, 0x06, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x20, 0x00, 0x02, 0x00, 0x28,
0x00,
0x0c, 0x00, 0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00,
0x00,
0xa0, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
0x00,
0x51, 0xe5, 0x74, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x06, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x8d, 0x4c, 0x24,
0x04,
0x83, 0xe4, 0xf0, 0xff, 0x71, 0xfc, 0x55, 0x89, 0xe5, 0x51, 0x83,
0xec,
0x04, 0xe8, 0x0a, 0x00, 0x00, 0x00, 0x90, 0x83, 0xc4, 0x04, 0x59,
0x5d,
0x8d, 0x61, 0xfc, 0xc3, 0x55, 0x89, 0xe5, 0x83, 0xec, 0x10, 0xb8,
0x00,
0x00, 0x00, 0x00, 0x89, 0xe1, 0xba, 0x34, 0x00, 0x00, 0x40, 0x0f,
0x34,
0x89, 0x45, 0xfc, 0x90, 0xc9, 0xc3, 0x00, 0x00, 0x14, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x7a, 0x52, 0x00, 0x01, 0x7c, 0x08,
0x01,
0x1b, 0x0c, 0x04, 0x04, 0x88, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00,
0x00,
0x1c, 0x00, 0x00, 0x00, 0xa4, 0xff, 0xff, 0xff, 0x20, 0x00, 0x00,
0x00,
0x00, 0x44, 0x0c, 0x01, 0x00, 0x47, 0x10, 0x05, 0x02, 0x75, 0x00,
0x43,
0x0f, 0x03, 0x75, 0x7c, 0x06, 0x4d, 0xc1, 0x0c, 0x01, 0x00, 0x41,
0xc5,
0x43, 0x0c, 0x04, 0x04, 0x1c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
0x00,
0x98, 0xff, 0xff, 0xff, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x41, 0x0e,
0x08,
0x85, 0x02, 0x42, 0x0d, 0x05, 0x56, 0xc5, 0x0c, 0x04, 0x04, 0x00,
0x00,
0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x01,
0x86, 0x00, 0x00, 0x00, 0x0c, 0x38, 0x00, 0x00, 0x00, 0x5c, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x02, 0x01, 0x06, 0x33, 0x00, 0x00, 0x00, 0x02, 0x02, 0x05,
0x3f,
0x00, 0x00, 0x00, 0x03, 0x04, 0x05, 0x69, 0x6e, 0x74, 0x00, 0x02,
0x08,
0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x05, 0x05, 0x00, 0x00,
0x00,
0x02, 0x01, 0x06, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x2a,
0x00,
0x00, 0x00, 0x02, 0x02, 0x07, 0x49, 0x00, 0x00, 0x00, 0x02, 0x04,
0x07,
0x18, 0x00, 0x00, 0x00, 0x02, 0x08, 0x07, 0x13, 0x00, 0x00, 0x00,
0x02,
0x04, 0x07, 0x1d, 0x00, 0x00, 0x00, 0x04, 0x0e, 0x00, 0x00, 0x00,
0x01,
0x08, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x01, 0x9c,
0x00,
0xa7, 0x00, 0x00, 0x00, 0x04, 0x00, 0x42, 0x00, 0x00, 0x00, 0x04,
0x01,
0xe9, 0x00, 0x00, 0x00, 0x0c, 0x57, 0x01, 0x00, 0x00, 0x67, 0x01,
0x00,
0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00, 0x00, 0x37, 0x00,
0x00,
0x00, 0x02, 0x01, 0x06, 0x33, 0x00, 0x00, 0x00, 0x02, 0x02, 0x05,
0x3f,
0x00, 0x00, 0x00, 0x03, 0x04, 0x05, 0x69, 0x6e, 0x74, 0x00, 0x02,
0x08,
0x05, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x05, 0x05, 0x00, 0x00,
0x00,
0x02, 0x01, 0x06, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x2a,
0x00,
0x00, 0x00, 0x02, 0x02, 0x07, 0x49, 0x00, 0x00, 0x00, 0x02, 0x04,
0x07,
0x18, 0x00, 0x00, 0x00, 0x02, 0x08, 0x07, 0x13, 0x00, 0x00, 0x00,
0x04,
0x75, 0x33, 0x32, 0x00, 0x02, 0x1d, 0x76, 0x00, 0x00, 0x00, 0x02,
0x04,
0x07, 0x1d, 0x00, 0x00, 0x00, 0x05, 0x5e, 0x01, 0x00, 0x00, 0x01,
0x09,
0x6b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a, 0x00, 0x00,
0x00,
0x01, 0x9c, 0x06, 0x26, 0x00, 0x00, 0x40, 0x11, 0x00, 0x00, 0x00,
0x07,
0x5f, 0x76, 0x00, 0x01, 0x0b, 0x6b, 0x00, 0x00, 0x00, 0x02, 0x91,
0x74,
0x00, 0x00, 0x00, 0x01, 0x11, 0x01, 0x25, 0x0e, 0x13, 0x0b, 0x03,
0x0e,
0x1b, 0x0e, 0x11, 0x01, 0x12, 0x06, 0x10, 0x17, 0x00, 0x00, 0x02,
0x24,
0x00, 0x0b, 0x0b, 0x3e, 0x0b, 0x03, 0x0e, 0x00, 0x00, 0x03, 0x24,
0x00,
0x0b, 0x0b, 0x3e, 0x0b, 0x03, 0x08, 0x00, 0x00, 0x04, 0x2e, 0x00,
0x3f,
0x19, 0x03, 0x0e, 0x3a, 0x0b, 0x3b, 0x0b, 0x27, 0x19, 0x11, 0x01,
0x12,
0x06, 0x40, 0x18, 0x96, 0x42, 0x19, 0x00, 0x00, 0x00, 0x01, 0x11,
0x01,
0x25, 0x0e, 0x13, 0x0b, 0x03, 0x0e, 0x1b, 0x0e, 0x11, 0x01, 0x12,
0x06,
0x10, 0x17, 0x00, 0x00, 0x02, 0x24, 0x00, 0x0b, 0x0b, 0x3e, 0x0b,
0x03,
0x0e, 0x00, 0x00, 0x03, 0x24, 0x00, 0x0b, 0x0b, 0x3e, 0x0b, 0x03,
0x08,
0x00, 0x00, 0x04, 0x16, 0x00, 0x03, 0x08, 0x3a, 0x0b, 0x3b, 0x0b,
0x49,
0x13, 0x00, 0x00, 0x05, 0x2e, 0x01, 0x3f, 0x19, 0x03, 0x0e, 0x3a,
0x0b,
0x3b, 0x0b, 0x27, 0x19, 0x49, 0x13, 0x11, 0x01, 0x12, 0x06, 0x40,
0x18,
0x97, 0x42, 0x19, 0x00, 0x00, 0x06, 0x0b, 0x01, 0x11, 0x01, 0x12,
0x06,
0x00, 0x00, 0x07, 0x34, 0x00, 0x03, 0x08, 0x3a, 0x0b, 0x3b, 0x0b,
0x49,
0x13, 0x02, 0x18, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x02,
0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x84, 0x00, 0x00,
0x00,
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x1a,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33,
0x00,
0x00, 0x00, 0x02, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x01, 0xfb,
0x0e,
0x0d, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00,
0x01, 0x00, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x63, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x05, 0x02, 0x00, 0x00, 0x00, 0x40, 0x1a, 0x08, 0x13,
0x59,
0x02, 0x0a, 0x00, 0x01, 0x01, 0x4b, 0x00, 0x00, 0x00, 0x02, 0x00,
0x33,
0x00, 0x00, 0x00, 0x01, 0x01, 0xfb, 0x0e, 0x0d, 0x00, 0x01, 0x01,
0x01,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x2e, 0x2e, 0x2f,
0x69,
0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x00, 0x00, 0x6c, 0x69, 0x62,
0x63,
0x2e, 0x63, 0x00, 0x00, 0x00, 0x00, 0x74, 0x79, 0x70, 0x65, 0x73,
0x2e,
0x68, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x20, 0x00,
0x00,
0x40, 0x03, 0x09, 0x01, 0x67, 0x08, 0x13, 0x02, 0x03, 0x00, 0x01,
0x01,
0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x69,
0x6e,
0x74, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x6c, 0x6f, 0x6e, 0x67,
0x20,
0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e,
0x65,
0x64, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x75, 0x6e, 0x73, 0x69, 0x67,
0x6e,
0x65, 0x64, 0x20, 0x63, 0x68, 0x61, 0x72, 0x00, 0x74, 0x65, 0x73,
0x74,
0x2e, 0x63, 0x00, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20, 0x69, 0x6e,
0x74,
0x00, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20, 0x75, 0x6e, 0x73, 0x69,
0x67,
0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x00, 0x2f, 0x68, 0x6f,
0x6d,
0x65, 0x2f, 0x68, 0x6f, 0x72, 0x64, 0x65, 0x2f, 0x42, 0x75, 0x72,
0x65,
0x61, 0x75, 0x2f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x2f, 0x63, 0x6f,
0x73,
0x32, 0x30, 0x30, 0x30, 0x2f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61,
0x6d,
0x73, 0x00, 0x47, 0x4e, 0x55, 0x20, 0x43, 0x31, 0x31, 0x20, 0x35,
0x2e,
0x34, 0x2e, 0x30, 0x20, 0x32, 0x30, 0x31, 0x36, 0x30, 0x36, 0x30,
0x39,
0x20, 0x2d, 0x6d, 0x33, 0x32, 0x20, 0x2d, 0x6d, 0x74, 0x75, 0x6e,
0x65,
0x3d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x2d, 0x6d,
0x61,
0x72, 0x63, 0x68, 0x3d, 0x69, 0x36, 0x38, 0x36, 0x20, 0x2d, 0x67,
0x20,
0x2d, 0x4f, 0x30, 0x20, 0x2d, 0x66, 0x66, 0x72, 0x65, 0x65, 0x73,
0x74,
0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x2d, 0x66, 0x6e, 0x6f,
0x2d,
0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x20, 0x2d, 0x66, 0x6e,
0x6f,
0x2d, 0x70, 0x69, 0x65, 0x00, 0x47, 0x4e, 0x55, 0x20, 0x43, 0x31,
0x31,
0x20, 0x35, 0x2e, 0x34, 0x2e, 0x30, 0x20, 0x32, 0x30, 0x31, 0x36,
0x30,
0x36, 0x30, 0x39, 0x20, 0x2d, 0x46, 0x65, 0x6c, 0x66, 0x2d, 0x69,
0x33,
0x38, 0x36, 0x20, 0x2d, 0x6d, 0x33, 0x32, 0x20, 0x2d, 0x6d, 0x74,
0x75,
0x6e, 0x65, 0x3d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20,
0x2d,
0x6d, 0x61, 0x72, 0x63, 0x68, 0x3d, 0x69, 0x36, 0x38, 0x36, 0x20,
0x2d,
0x67, 0x20, 0x2d, 0x4f, 0x30, 0x20, 0x2d, 0x66, 0x66, 0x72, 0x65,
0x65,
0x73, 0x74, 0x61, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x2d, 0x66,
0x6e,
0x6f, 0x2d, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x20, 0x2d,
0x66,
0x6e, 0x6f, 0x2d, 0x70, 0x69, 0x65, 0x00, 0x6c, 0x69, 0x62, 0x63,
0x2e,
0x63, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x00,
0x2f,
0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x68, 0x6f, 0x72, 0x64, 0x65, 0x2f,
0x42,
0x75, 0x72, 0x65, 0x61, 0x75, 0x2f, 0x50, 0x45, 0x52, 0x53, 0x4f,
0x2f,
0x63, 0x6f, 0x73, 0x32, 0x30, 0x30, 0x30, 0x2f, 0x70, 0x72, 0x6f,
0x67,
0x72, 0x61, 0x6d, 0x73, 0x2f, 0x6c, 0x69, 0x62, 0x00, 0x47, 0x43,
0x43,
0x3a, 0x20, 0x28, 0x55, 0x62, 0x75, 0x6e, 0x74, 0x75, 0x20, 0x35,
0x2e,
0x34, 0x2e, 0x30, 0x2d, 0x36, 0x75, 0x62, 0x75, 0x6e, 0x74, 0x75,
0x31,
0x7e, 0x31, 0x36, 0x2e, 0x30, 0x34, 0x2e, 0x31, 0x30, 0x29, 0x20,
0x35,
0x2e, 0x34, 0x2e, 0x30, 0x20, 0x32, 0x30, 0x31, 0x36, 0x30, 0x36,
0x30,
0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01,
0x00,
0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x00,
0x03, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x03, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x07,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x03, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf1, 0xff, 0x08, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf1,
0xff,
0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00,
0x00,
0x12, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
0x40,
0x1a, 0x00, 0x00, 0x00, 0x12, 0x00, 0x01, 0x00, 0x00, 0x74, 0x65,
0x73,
0x74, 0x2e, 0x63, 0x00, 0x6c, 0x69, 0x62, 0x63, 0x2e, 0x63, 0x00,
0x6d,
0x61, 0x69, 0x6e, 0x00, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70,
0x69,
0x00, 0x00, 0x2e, 0x73, 0x79, 0x6d, 0x74, 0x61, 0x62, 0x00, 0x2e,
0x73,
0x74, 0x72, 0x74, 0x61, 0x62, 0x00, 0x2e, 0x73, 0x68, 0x73, 0x74,
0x72,
0x74, 0x61, 0x62, 0x00, 0x2e, 0x74, 0x65, 0x78, 0x74, 0x00, 0x2e,
0x65,
0x68, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x00, 0x2e, 0x64, 0x65,
0x62,
0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x00, 0x2e, 0x64, 0x65,
0x62,
0x75, 0x67, 0x5f, 0x61, 0x62, 0x62, 0x72, 0x65, 0x76, 0x00, 0x2e,
0x64,
0x65, 0x62, 0x75, 0x67, 0x5f, 0x61, 0x72, 0x61, 0x6e, 0x67, 0x65,
0x73,
0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x6c, 0x69, 0x6e,
0x65,
0x00, 0x2e, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x73, 0x74, 0x72,
0x00,
0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00,
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x74, 0x00, 0x00,
0x00,
0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00,
0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00,
0x40,
0xb0, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x2b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x00, 0x2f, 0x01, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x02, 0x00,
0x00,
0xab, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00,
0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0xee, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x2e, 0x03, 0x00, 0x00, 0x86, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x03, 0x00,
0x00,
0x95, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x6b, 0x00, 0x00,
0x00,
0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x49, 0x05, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00,
0x11, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x6d, 0x06, 0x00, 0x00, 0x74, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00,
0x00,
0xd0, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00,
0x00,
0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00,
0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x50, 0x06, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00
};
unsigned int programs_test_len = 2244;

View File

@ -3,9 +3,9 @@
/* */
/* Police de caract鑽e fine 8x16 */
static u8 font8x16[4096] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
static u8 font8x16[4096] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81, 0x81, 0xBD, 0x99, 0x81, 0x7E,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -22,21 +22,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x00, 0x00, 0x00,
0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
0x00,
0x00, 0x00, 0x00,
0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF,
0xFF, 0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0x00,
0x00, 0x0F, 0x07, 0x0D, 0x19, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x30, 0x70, 0xF0, 0xE0, 0x00, 0x00, 0x00,
0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x63, 0x67, 0xE7, 0xE6, 0xC0, 0x00,
0xFF, 0xFF,
0xFF, 0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF, 0xFF, 0xFF,
0xFF, 0x00, 0x00,
0x00,
0x00, 0x0F, 0x07, 0x0D, 0x19, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18, 0x18,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x3F, 0x33, 0x3F, 0x30, 0x30, 0x30, 0x70, 0xF0, 0xE0,
0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x18, 0xDB, 0x3C, 0xE7, 0x3C, 0xDB, 0x18, 0x18, 0x00,
0x00, 0x00,
0x00, 0x00, 0x7F, 0x63, 0x7F, 0x63, 0x63, 0x63, 0x67, 0xE7, 0xE6,
0xC0, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x18, 0xDB, 0x3C, 0xE7, 0x3C, 0xDB, 0x18, 0x18,
0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x60, 0x70, 0x7C, 0x7F, 0x7C, 0x70, 0x60, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -53,21 +61,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x3C,
0x7E, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00,
0x7E, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x18,
0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00,
0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x0C, 0x06, 0x7F, 0x06, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x7F, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x3E, 0x7F, 0x7F, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x0C, 0x06, 0x7F, 0x06, 0x0C, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x7F, 0x30, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x7F, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x1C, 0x1C, 0x3E, 0x3E, 0x7F, 0x7F, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7F, 0x7F, 0x3E, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -84,21 +100,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x61, 0x91, 0x92,
0x64, 0x08, 0x10, 0x26, 0x49, 0x89, 0x86, 0x00, 0x00, 0x00, 0x00,
0x00, 0x70, 0x88, 0x88,
0x88, 0x50, 0x60, 0x91, 0x8A, 0x84, 0x4A, 0x31, 0x00, 0x00, 0x00, 0x00,
0x88, 0x50, 0x60, 0x91, 0x8A, 0x84, 0x4A, 0x31, 0x00, 0x00, 0x00,
0x00,
0x00, 0x18, 0x18,
0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x06,
0x18, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00,
0x00,
0x60, 0x18, 0x04, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x18, 0x60, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0xFE, 0x38, 0x54, 0x92, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x10,
0x00, 0x06,
0x18, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x18, 0x06, 0x00,
0x00, 0x00, 0x00,
0x00,
0x60, 0x18, 0x04, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x18, 0x60,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x92, 0x54, 0x38, 0xFE, 0x38, 0x54, 0x92, 0x10,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x18, 0x10,
0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x18, 0x00, 0x00, 0x00, 0x00,
@ -115,21 +139,29 @@ static u8 font8x16[4096] =
0x00, 0x02, 0x06, 0x0A, 0x12,
0x22, 0x42, 0x82, 0xFF, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0x80, 0x80,
0x80, 0xFC, 0x02, 0x01, 0x01, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x80, 0xFC, 0x02, 0x01, 0x01, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00,
0x00,
0x00, 0x3C, 0x42,
0x81, 0x80, 0xBC, 0xC2, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF,
0x81, 0x01, 0x02, 0x04, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00,
0x3C, 0x42, 0x81, 0x81, 0x42, 0x3C, 0x42, 0x81, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3C, 0x42, 0x81, 0x81, 0x43, 0x3D, 0x01, 0x01, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00,
0x81, 0x80, 0xBC, 0xC2, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x10,
0x00, 0xFF,
0x81, 0x01, 0x02, 0x04, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
0x00, 0x00, 0x00,
0x00,
0x3C, 0x42, 0x81, 0x81, 0x42, 0x3C, 0x42, 0x81, 0x81, 0x42, 0x3C,
0x00, 0x00, 0x00, 0x00,
0x00, 0x3C, 0x42, 0x81, 0x81, 0x43, 0x3D, 0x01, 0x01, 0x81, 0x42,
0x3C, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18,
0x18, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18,
0x18, 0x10,
0x20, 0x00, 0x00,
0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02,
0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x20, 0x10, 0x08, 0x04,
0x02,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -146,21 +178,29 @@ static u8 font8x16[4096] =
0x00, 0x3C, 0x42, 0x81, 0x81,
0x80, 0x80, 0x80, 0x80, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFC, 0x42, 0x41,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0xFC, 0x00, 0x00, 0x00, 0x00,
0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x42, 0xFC, 0x00, 0x00, 0x00,
0x00,
0x00, 0xFF, 0x80,
0x80, 0x80, 0x80, 0xFC, 0x80, 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF,
0x80, 0x80, 0x80, 0x80, 0xFC, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00,
0x3C, 0x42, 0x81, 0x81, 0x80, 0x9F, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00, 0x00, 0x00,
0x00,
0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00,
0x80, 0x80, 0x80, 0xFC, 0x80, 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00,
0x00, 0x00,
0x00, 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x82, 0x82, 0x44, 0x38, 0x00,
0x00, 0xFF,
0x80, 0x80, 0x80, 0x80, 0xFC, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
0x00, 0x00, 0x00,
0x00, 0x81, 0x82, 0x84, 0x88, 0x90, 0xE0, 0x90, 0x88, 0x84, 0x82, 0x81,
0x00,
0x3C, 0x42, 0x81, 0x81, 0x80, 0x9F, 0x81, 0x81, 0x81, 0x42, 0x3C,
0x00, 0x00, 0x00, 0x00,
0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF, 0x81, 0x81, 0x81, 0x81,
0x81, 0x00, 0x00, 0x00,
0x00,
0x00, 0x38, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
0x38, 0x00, 0x00,
0x00, 0x00,
0x00, 0x07, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x82, 0x82, 0x44,
0x38, 0x00,
0x00, 0x00, 0x00,
0x00, 0x81, 0x82, 0x84, 0x88, 0x90, 0xE0, 0x90, 0x88, 0x84, 0x82,
0x81,
0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0xFF, 0x00, 0x00, 0x00, 0x00,
@ -177,21 +217,29 @@ static u8 font8x16[4096] =
0x00, 0xFC, 0x82, 0x81, 0x81,
0x82, 0xFC, 0x90, 0x88, 0x84, 0x82, 0x81, 0x00, 0x00, 0x00, 0x00,
0x00, 0x3C, 0x42, 0x81,
0x80, 0x40, 0x3C, 0x02, 0x01, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x80, 0x40, 0x3C, 0x02, 0x01, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00,
0x00,
0x00, 0xFE, 0x92,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
0x00, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x00,
0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x99, 0x99, 0xA5, 0xA5, 0x42, 0x00, 0x00, 0x00,
0x00,
0x00, 0x81, 0x81, 0x81, 0x42, 0x24, 0x18, 0x24, 0x42, 0x81, 0x81, 0x81, 0x00, 0x00,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00,
0x00, 0x00,
0x00, 0x82, 0x82, 0x82, 0x82, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00,
0x00, 0x81,
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x3C, 0x00,
0x00, 0x00, 0x00,
0x00, 0xFF, 0x01, 0x01, 0x02, 0x04, 0x18, 0x20, 0x40, 0x80, 0x80, 0xFF,
0x00,
0x81, 0x81, 0x81, 0x81, 0x81, 0x42, 0x42, 0x24, 0x24, 0x18, 0x18,
0x00, 0x00, 0x00, 0x00,
0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x99, 0x99, 0xA5, 0xA5,
0x42, 0x00, 0x00, 0x00,
0x00,
0x00, 0x81, 0x81, 0x81, 0x42, 0x24, 0x18, 0x24, 0x42, 0x81, 0x81,
0x81, 0x00, 0x00,
0x00, 0x00,
0x00, 0x82, 0x82, 0x82, 0x82, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10,
0x10, 0x00,
0x00, 0x00, 0x00,
0x00, 0xFF, 0x01, 0x01, 0x02, 0x04, 0x18, 0x20, 0x40, 0x80, 0x80,
0xFF,
0x00, 0x00, 0x00, 0x00,
0x00, 0x7E, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,
0x7E, 0x00, 0x00, 0x00, 0x00,
@ -208,21 +256,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x00, 0x00, 0x00,
0x7C, 0x02, 0x02, 0x7E, 0x82, 0x82, 0x7D, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x80, 0x80,
0x80, 0xBC, 0xC2, 0x81, 0x81, 0x81, 0xC2, 0xBC, 0x00, 0x00, 0x00, 0x00,
0x80, 0xBC, 0xC2, 0x81, 0x81, 0x81, 0xC2, 0xBC, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x3C, 0x42, 0x80, 0x80, 0x80, 0x42, 0x3C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01,
0x01, 0x01, 0x01, 0x3D, 0x43, 0x81, 0x81, 0x81, 0x43, 0x3D, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x81, 0xFF, 0x80, 0x40, 0x3E, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0E, 0x11, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x43, 0x81, 0x81, 0x43, 0x3D, 0x01, 0x02, 0x7C,
0x00, 0x00, 0x3C, 0x42, 0x80, 0x80, 0x80, 0x42, 0x3C, 0x00, 0x00,
0x00, 0x00,
0x00, 0x80, 0x80, 0x80, 0x80, 0xBC, 0xC2, 0x81, 0x81, 0x81, 0x81, 0x81, 0x00,
0x00, 0x01,
0x01, 0x01, 0x01, 0x3D, 0x43, 0x81, 0x81, 0x81, 0x43, 0x3D, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x08, 0x00, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x3E,
0x00,
0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x81, 0xFF, 0x80, 0x40, 0x3E,
0x00, 0x00, 0x00, 0x00,
0x00, 0x0E, 0x11, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10,
0x10, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3D, 0x43, 0x81, 0x81, 0x43, 0x3D,
0x01, 0x02, 0x7C,
0x00, 0x00,
0x00, 0x80, 0x80, 0x80, 0x80, 0xBC, 0xC2, 0x81, 0x81, 0x81, 0x81,
0x81, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x08, 0x08, 0x00, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08,
0x3E,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x02, 0x00, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02,
0x82, 0x44, 0x38, 0x00, 0x00,
@ -239,21 +295,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x00, 0x00, 0x00,
0xBC, 0xC2, 0x81, 0x81, 0x81, 0xC2, 0xBC, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x3D, 0x43, 0x81, 0x81, 0x81, 0x43, 0x3D, 0x01, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0xBE, 0xC1, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x7E, 0x81, 0x80, 0x7E, 0x01, 0x81, 0x7E, 0x00, 0x00, 0x00, 0x00,
0x10,
0x10, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x11, 0x0E, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x43, 0x3D, 0x00, 0x00, 0x00,
0x00, 0x3D, 0x43, 0x81, 0x81, 0x81, 0x43, 0x3D, 0x01, 0x01, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x42, 0x24, 0x18, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92, 0x92, 0x92, 0xAA, 0x44, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x42, 0x24, 0x18, 0x24, 0x42, 0x81,
0x00, 0x00, 0xBE, 0xC1, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x7E, 0x81, 0x80, 0x7E, 0x01, 0x81, 0x7E, 0x00,
0x00, 0x00, 0x00,
0x10,
0x10, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x11, 0x0E,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x81, 0x43,
0x3D, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x42, 0x24,
0x18, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92, 0x92, 0x92, 0xAA,
0x44, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x42, 0x24, 0x18, 0x24, 0x42,
0x81,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x81, 0x81, 0x81, 0x43, 0x3D,
0x01, 0x02, 0x7C, 0x00, 0x00,
@ -270,21 +334,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x00, 0x00, 0x08,
0x1C, 0x36, 0x63, 0x63, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1E, 0x33,
0x61, 0x60, 0x60, 0x61, 0x33, 0x1E, 0x06, 0x03, 0x3E, 0x00, 0x00, 0x00,
0x61, 0x60, 0x60, 0x61, 0x33, 0x1E, 0x06, 0x03, 0x3E, 0x00, 0x00,
0x00,
0x00, 0x00, 0x66,
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x06,
0x0C, 0x18, 0x00, 0x3E, 0x63, 0x7F, 0x60, 0x63, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x08, 0x1C, 0x36, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x66, 0x66, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x30, 0x18, 0x0C, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00,
0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x1C, 0x36, 0x1C, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00, 0x00,
0x00, 0x06,
0x0C, 0x18, 0x00, 0x3E, 0x63, 0x7F, 0x60, 0x63, 0x3E, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x60, 0x66, 0x3C, 0x0C, 0x06, 0x3C,
0x00,
0x08, 0x1C, 0x36, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x66, 0x66, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x30, 0x18, 0x0C, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x1C, 0x36, 0x1C, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B,
0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3C, 0x66, 0x60, 0x66, 0x3C, 0x0C, 0x06,
0x3C,
0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x1C, 0x36, 0x00, 0x3E, 0x63, 0x7F, 0x60, 0x63, 0x3E,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -301,21 +373,29 @@ static u8 font8x16[4096] =
0x00, 0x63, 0x63, 0x08, 0x1C,
0x36, 0x63, 0x63, 0x7F, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1C, 0x36, 0x1C, 0x00,
0x1C, 0x36, 0x63, 0x63, 0x7F, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1C, 0x36, 0x63, 0x63, 0x7F, 0x63, 0x63, 0x00, 0x00, 0x00, 0x00,
0x00,
0x0C, 0x18, 0x30,
0x00, 0x7F, 0x33, 0x30, 0x3E, 0x30, 0x33, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7F, 0x33, 0x30, 0x3E, 0x30, 0x33, 0x7F, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x6E, 0x3B, 0x1B, 0x7E, 0xD8, 0xDC, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x1F, 0x36, 0x66, 0x66, 0x7F, 0x66, 0x66, 0x66, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x1C, 0x36, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x63, 0x63, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x30, 0x18, 0x0C, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x00, 0x00,
0x00, 0x00, 0x6E, 0x3B, 0x1B, 0x7E, 0xD8, 0xDC, 0x77, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x18, 0x3C, 0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3B, 0x00,
0x00,
0x00, 0x1F, 0x36, 0x66, 0x66, 0x7F, 0x66, 0x66, 0x66, 0x67, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x08, 0x1C, 0x36, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x63, 0x63, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x30, 0x18, 0x0C, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E,
0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x18, 0x3C, 0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3B,
0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x30, 0x18, 0x0C, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3B,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -332,21 +412,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0xC3, 0x66, 0x3C,
0x18, 0xFF, 0x18, 0xFF, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFC, 0x66, 0x66,
0x7C, 0x62, 0x66, 0x6F, 0x66, 0x66, 0xF3, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7C, 0x62, 0x66, 0x6F, 0x66, 0x66, 0xF3, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x0E, 0x1B,
0x18, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x18, 0xD8, 0x70, 0x00, 0x00, 0x00,
0x00, 0x0C,
0x18, 0x30, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x0C, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0C, 0x18, 0x30, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x0C, 0x18, 0x30, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3B, 0x00, 0x00, 0x00,
0x18, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x18, 0x18, 0xD8, 0x70, 0x00,
0x00, 0x00,
0x00, 0x00, 0x3B, 0x6E, 0x00, 0x6E, 0x33, 0x33, 0x33, 0x33, 0x33, 0x00, 0x00,
0x00, 0x0C,
0x18, 0x30, 0x00, 0x3C, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00, 0x00,
0x00, 0x00, 0x00,
0x3B, 0x6E, 0x00, 0x63, 0x73, 0x7B, 0x7F, 0x6F, 0x67, 0x63, 0x63, 0x00,
0x00,
0x0C, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x0C, 0x18, 0x30, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x3E,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x0C, 0x18, 0x30, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3B,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x3B, 0x6E, 0x00, 0x6E, 0x33, 0x33, 0x33, 0x33, 0x33,
0x00, 0x00,
0x00, 0x00, 0x00,
0x3B, 0x6E, 0x00, 0x63, 0x73, 0x7B, 0x7F, 0x6F, 0x67, 0x63, 0x63,
0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x3C, 0x6C, 0x6C, 0x3E, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -363,21 +451,29 @@ static u8 font8x16[4096] =
0x00, 0x60, 0xE0, 0x63, 0x66,
0x6C, 0x18, 0x33, 0x67, 0xCF, 0x1F, 0x03, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x18,
0x00, 0x18, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x1B, 0x36, 0x6C, 0x36, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x6C, 0x36, 0x1B, 0x36, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x11,
0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x00, 0x00,
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x00,
0x00, 0x18, 0x18, 0x3C, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00,
0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77,
0x00, 0x00, 0x00,
0x00, 0x1B, 0x36, 0x6C, 0x36, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
0x00, 0x00,
0x00, 0x00, 0x6C, 0x36, 0x1B, 0x36, 0x6C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x11,
0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44,
0x11, 0x44, 0x00, 0x00,
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55,
0xAA, 0x55, 0xAA, 0x00,
0x00,
0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD, 0x77, 0xDD,
0x77, 0xDD, 0x77,
0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18,
0x18, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0x18, 0x18,
0x18,
0x18, 0x18, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x18, 0x18, 0x18,
0x18, 0x18, 0x18, 0x00, 0x00,
@ -394,21 +490,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x00, 0x00, 0x00,
0xFE, 0x06, 0xF6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00,
0x36, 0x36, 0x36, 0x36,
0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x36, 0xF6, 0x06, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x36, 0x36, 0x36,
0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x18, 0x18,
0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x36, 0x36, 0x36, 0x36, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18,
0x18, 0x18, 0x18, 0xF8, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x18, 0x18, 0x18,
0x18, 0x18,
0x18, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1F, 0x18, 0x18, 0x18,
0x18,
0x18, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -425,21 +529,29 @@ static u8 font8x16[4096] =
0x36, 0x36, 0x36, 0x36, 0x36,
0xF7, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00,
0x36, 0x36, 0x36,
0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x36,
0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xFF, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00,
0x00,
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x36, 0x36, 0x36,
0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18, 0x18, 0x18,
0x00, 0x00,
0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x36,
0x36, 0x36, 0x36, 0x36, 0xF7, 0x00, 0xF7, 0x36, 0x36, 0x36, 0x36,
0x36, 0x36, 0x00, 0x00,
0x18, 0x18, 0x18, 0x18, 0x18, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00,
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xFF, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x18, 0x18, 0x18,
0x18, 0x18,
0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36, 0x36,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x36, 0x36, 0x36,
0x36,
0x36, 0x36, 0x00, 0x00,
0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3F, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -456,21 +568,29 @@ static u8 font8x16[4096] =
0x18, 0x18, 0x18, 0x18, 0x18,
0x18, 0x18, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00,
0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
0xF0,
0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0x00, 0x00,
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00,
0x00, 0x00, 0x00, 0x1F, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x6E, 0x6C, 0x6C, 0x6E, 0x3B, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0x00, 0x00,
0xF0,
0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0,
0xF0, 0xF0, 0x00, 0x00,
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F,
0x0F, 0x0F, 0x0F, 0x00,
0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x63, 0x7E, 0x63, 0x63, 0x7E, 0x60, 0x60,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3B, 0x6E, 0x6C, 0x6C, 0x6E, 0x3B,
0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x63, 0x7E, 0x63, 0x63, 0x7E, 0x60,
0x60,
0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7F, 0x63, 0x63, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -487,21 +607,29 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x7E, 0x18, 0x3C,
0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1C, 0x36,
0x63, 0x63, 0x7F, 0x63, 0x63, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x63, 0x63, 0x7F, 0x63, 0x63, 0x36, 0x1C, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x1C,
0x36, 0x63, 0x63, 0x63, 0x36, 0x36, 0x36, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00,
0x36, 0x63, 0x63, 0x63, 0x36, 0x36, 0x36, 0x77, 0x00, 0x00, 0x00,
0x00, 0x00,
0x1E, 0x30, 0x18, 0x0C, 0x3E, 0x66, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0x06, 0x7E, 0xDB, 0xDB, 0xF3, 0x7E, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x1C, 0x30, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x30, 0x1C, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x00, 0x00,
0x1E, 0x30, 0x18, 0x0C, 0x3E, 0x66, 0x66, 0x66, 0x3C, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x7F, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00, 0x7E, 0xDB, 0xDB, 0x7E, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x03, 0x06, 0x7E, 0xDB, 0xDB, 0xF3, 0x7E, 0x60, 0xC0,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x1C, 0x30, 0x60, 0x60, 0x7C, 0x60, 0x60, 0x30, 0x1C,
0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x3E, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63,
0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x7F, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x18, 0x18, 0xFF, 0x18, 0x18, 0x18, 0x00, 0xFF,
0x00, 0x00, 0x00, 0x00, 0x00,
@ -518,22 +646,28 @@ static u8 font8x16[4096] =
0x00, 0x00, 0x00, 0x00, 0x3B,
0x6E, 0x00, 0x3B, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x38, 0x6C, 0x6C,
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x3C, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00,
0x0F, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xEC, 0x6C, 0x3C, 0x1C, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0xD8, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xD8, 0x6C, 0x6C, 0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x70, 0xD8, 0x30, 0x60, 0xC8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x00, 0x00, 0x00,
0x00, 0x70, 0xD8, 0x30, 0x60, 0xC8, 0xF8, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x00,
0x00, 0x00,
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00,
0x00, 0x00, 0x00, 0x00
};

View File

@ -3,9 +3,9 @@
/* */
/* Police de caract鑽e fine 8x8 */
static u8 font8x8[2048] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81,
static u8 font8x8[2048] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x81, 0xA5,
0x81,
0xBD, 0x99, 0x81, 0x7E,
0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E, 0x6C, 0xFE, 0xFE,
0xFE, 0x7C, 0x38, 0x10, 0x00,
@ -22,21 +22,29 @@ static u8 font8x8[2048] =
0x7F, 0x63, 0x7F, 0x63, 0x63,
0x67, 0xE6, 0xC0, 0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99,
0x80, 0xE0, 0xF8, 0xFE,
0xF8, 0xE0, 0x80, 0x00, 0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00,
0xF8, 0xE0, 0x80, 0x00, 0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02,
0x00,
0x18, 0x3C, 0x7E,
0x18, 0x18, 0x7E, 0x3C, 0x18, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00,
0x18, 0x18, 0x7E, 0x3C, 0x18, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00,
0x66, 0x00,
0x7F, 0xDB,
0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00, 0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0xCC, 0x78,
0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00, 0x3E, 0x63, 0x38, 0x6C, 0x6C,
0x38, 0xCC, 0x78,
0x00,
0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00, 0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF,
0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00, 0x18, 0x3C, 0x7E, 0x18,
0x7E, 0x3C, 0x18, 0xFF,
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18,
0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18,
0x18, 0x7E, 0x3C, 0x18,
0x00,
0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x30, 0x60, 0xFE, 0x60, 0x30,
0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x30, 0x60,
0xFE, 0x60, 0x30,
0x00, 0x00,
0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00, 0x00, 0x24, 0x66, 0xFF, 0x66,
0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00, 0x00, 0x24, 0x66,
0xFF, 0x66,
0x24, 0x00, 0x00,
0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7E,
0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF,
0x7E,
0x3C, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40,
0x40, 0x40, 0x00, 0x40, 0x00,
@ -53,21 +61,29 @@ static u8 font8x8[2048] =
0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x60, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00,
0x70, 0x88, 0x98,
0xA8, 0xC8, 0x88, 0x70, 0x00, 0x40, 0xC0, 0x40, 0x40, 0x40, 0x40, 0xE0, 0x00,
0x70, 0x88,
0x08, 0x10, 0x20, 0x40, 0xF8, 0x00, 0x70, 0x88, 0x08, 0x10, 0x08, 0x88, 0x70, 0x00,
0x08,
0x18, 0x28, 0x48, 0xFC, 0x08, 0x08, 0x00, 0xF8, 0x80, 0x80, 0xF0, 0x08, 0x88, 0x70, 0x00,
0x20, 0x40, 0x80, 0xF0, 0x88, 0x88, 0x70, 0x00, 0xF8, 0x08, 0x10, 0x20, 0x40, 0x40, 0x40,
0x00, 0x60, 0x60, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0x00,
0x70, 0x88, 0x88, 0x70, 0x88, 0x88, 0x70, 0x00, 0x70, 0x88, 0x88, 0x78, 0x08, 0x08,
0x70, 0x88, 0x98,
0xA8, 0xC8, 0x88, 0x70, 0x00, 0x40, 0xC0, 0x40, 0x40, 0x40, 0x40,
0xE0, 0x00,
0x70, 0x88,
0x08, 0x10, 0x20, 0x40, 0xF8, 0x00, 0x70, 0x88, 0x08, 0x10, 0x08,
0x88, 0x70, 0x00,
0x08,
0x18, 0x28, 0x48, 0xFC, 0x08, 0x08, 0x00, 0xF8, 0x80, 0x80, 0xF0,
0x08, 0x88, 0x70, 0x00,
0x20, 0x40, 0x80, 0xF0, 0x88, 0x88, 0x70, 0x00, 0xF8, 0x08, 0x10,
0x20, 0x40, 0x40, 0x40,
0x00,
0x70, 0x88, 0x88, 0x70, 0x88, 0x88, 0x70, 0x00, 0x70, 0x88, 0x88,
0x78, 0x08, 0x08,
0x70, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00,
0x00, 0x00, 0x60, 0x60, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60,
0x60, 0x00,
0x60, 0x60, 0x20,
0x10, 0x20, 0x40, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0xF8, 0x00,
0x10, 0x20, 0x40, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0xF8,
0x00,
0xF8, 0x00, 0x00, 0x00,
0x80, 0x40, 0x20, 0x10, 0x20, 0x40, 0x80, 0x00, 0x78, 0x84, 0x04,
0x08, 0x10, 0x00, 0x10, 0x00,
@ -84,21 +100,29 @@ static u8 font8x8[2048] =
0x38, 0x10, 0x10, 0x10, 0x10,
0x90, 0x60, 0x00, 0x88, 0x90, 0xA0, 0xC0, 0xA0, 0x90, 0x88, 0x00,
0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0xF8, 0x00, 0x82, 0xC6, 0xAA, 0x92, 0x82, 0x82, 0x82, 0x00,
0x84, 0xC4, 0xA4,
0x94, 0x8C, 0x84, 0x84, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
0xF0, 0x88,
0x88, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x70, 0x88, 0x88, 0x88, 0xA8, 0x90, 0x68, 0x00,
0xF0,
0x88, 0x88, 0xF0, 0xA0, 0x90, 0x88, 0x00, 0x70, 0x88, 0x80, 0x70, 0x08, 0x88, 0x70, 0x00,
0xF8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70,
0x80, 0x80, 0xF8, 0x00, 0x82, 0xC6, 0xAA, 0x92, 0x82, 0x82, 0x82,
0x00,
0x88, 0x88, 0x88, 0x50, 0x50, 0x20, 0x20, 0x00, 0x82, 0x82, 0x82, 0x82, 0x92, 0x92,
0x84, 0xC4, 0xA4,
0x94, 0x8C, 0x84, 0x84, 0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x88,
0x70, 0x00,
0xF0, 0x88,
0x88, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x70, 0x88, 0x88, 0x88, 0xA8,
0x90, 0x68, 0x00,
0xF0,
0x88, 0x88, 0xF0, 0xA0, 0x90, 0x88, 0x00, 0x70, 0x88, 0x80, 0x70,
0x08, 0x88, 0x70, 0x00,
0xF8, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x88, 0x88, 0x88,
0x88, 0x88, 0x88, 0x70,
0x00,
0x88, 0x88, 0x88, 0x50, 0x50, 0x20, 0x20, 0x00, 0x82, 0x82, 0x82,
0x82, 0x92, 0x92,
0x6C, 0x00,
0x88, 0x88, 0x50, 0x20, 0x50, 0x88, 0x88, 0x00, 0x88, 0x88, 0x88, 0x50, 0x20,
0x88, 0x88, 0x50, 0x20, 0x50, 0x88, 0x88, 0x00, 0x88, 0x88, 0x88,
0x50, 0x20,
0x20, 0x20, 0x00,
0xF8, 0x08, 0x10, 0x20, 0x40, 0x80, 0xF8, 0x00, 0xE0, 0x80, 0x80, 0x80,
0xF8, 0x08, 0x10, 0x20, 0x40, 0x80, 0xF8, 0x00, 0xE0, 0x80, 0x80,
0x80,
0x80, 0x80, 0xE0, 0x00,
0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0xE0, 0x20, 0x20,
0x20, 0x20, 0x20, 0xE0, 0x00,
@ -115,21 +139,29 @@ static u8 font8x8[2048] =
0x80, 0x80, 0xB0, 0xC8, 0x88,
0x88, 0x88, 0x00, 0x20, 0x00, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00,
0x10, 0x00, 0x30, 0x10,
0x10, 0x10, 0x90, 0x60, 0x80, 0x80, 0x88, 0x90, 0xA0, 0xD0, 0x88, 0x00,
0x10, 0x10, 0x90, 0x60, 0x80, 0x80, 0x88, 0x90, 0xA0, 0xD0, 0x88,
0x00,
0xC0, 0x40, 0x40,
0x40, 0x40, 0x40, 0xE0, 0x00, 0x00, 0x00, 0xEC, 0x92, 0x92, 0x92, 0x92, 0x00,
0x40, 0x40, 0x40, 0xE0, 0x00, 0x00, 0x00, 0xEC, 0x92, 0x92, 0x92,
0x92, 0x00,
0x00, 0x00,
0xB0, 0xC8, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x70, 0x88, 0x88, 0x88, 0x70, 0x00,
0xB0, 0xC8, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x70, 0x88, 0x88,
0x88, 0x70, 0x00,
0x00,
0x00, 0xB0, 0xC8, 0xC8, 0xB0, 0x80, 0x80, 0x00, 0x00, 0x68, 0x98, 0x98, 0x68, 0x08, 0x08,
0x00, 0xB0, 0xC8, 0xC8, 0xB0, 0x80, 0x80, 0x00, 0x00, 0x68, 0x98,
0x98, 0x68, 0x08, 0x08,
0x00, 0x00, 0xB0, 0xC8, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x78, 0x80, 0x70, 0x08, 0xF0,
0x00, 0x00, 0xB0, 0xC8, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x78,
0x80, 0x70, 0x08, 0xF0,
0x00,
0x40, 0x40, 0xE0, 0x40, 0x40, 0x50, 0x20, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0x98,
0x40, 0x40, 0xE0, 0x40, 0x40, 0x50, 0x20, 0x00, 0x00, 0x00, 0x88,
0x88, 0x88, 0x98,
0x68, 0x00,
0x00, 0x00, 0x88, 0x88, 0x88, 0x50, 0x20, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92,
0x00, 0x00, 0x88, 0x88, 0x88, 0x50, 0x20, 0x00, 0x00, 0x00, 0x82,
0x82, 0x92,
0x92, 0x6C, 0x00,
0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00, 0x00, 0x00, 0x88, 0x88,
0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00, 0x00, 0x00, 0x88,
0x88,
0x98, 0x68, 0x08, 0x70,
0x00, 0x00, 0xF8, 0x10, 0x20, 0x40, 0xF8, 0x00, 0x10, 0x20, 0x20,
0x40, 0x20, 0x20, 0x10, 0x00,
@ -146,21 +178,29 @@ static u8 font8x8[2048] =
0x48, 0x30, 0x00, 0x78, 0x0C,
0x7C, 0xCC, 0x76, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x10, 0x08, 0x30,
0x30, 0x48, 0x84, 0x78,
0xCC, 0xFC, 0xC0, 0x78, 0x00, 0x48, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78,
0xCC, 0xFC, 0xC0, 0x78, 0x00, 0x48, 0x00, 0x78, 0xCC, 0xFC, 0xC0,
0x78,
0x30, 0x08, 0x00,
0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, 0x48, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30,
0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00, 0x48, 0x00, 0x30, 0x30, 0x30,
0x30, 0x30,
0x30, 0x48,
0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x60, 0x10, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30,
0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x60, 0x10, 0x00, 0x30, 0x30,
0x30, 0x30, 0x30,
0x48,
0x00, 0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0x30, 0x48, 0x30, 0x48, 0x84, 0xFC, 0x84, 0x84,
0x00, 0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0x30, 0x48, 0x30, 0x48,
0x84, 0xFC, 0x84, 0x84,
0x18, 0x20, 0x00, 0xF8, 0x80, 0xF0, 0x80, 0xF8, 0x00, 0x00, 0x00, 0x66, 0x19, 0x77, 0x88,
0x18, 0x20, 0x00, 0xF8, 0x80, 0xF0, 0x80, 0xF8, 0x00, 0x00, 0x00,
0x66, 0x19, 0x77, 0x88,
0x77,
0x00, 0x00, 0x00, 0x0F, 0x14, 0x3E, 0x44, 0x87, 0x30, 0x48, 0x84, 0x78, 0xCC, 0xCC,
0x00, 0x00, 0x00, 0x0F, 0x14, 0x3E, 0x44, 0x87, 0x30, 0x48, 0x84,
0x78, 0xCC, 0xCC,
0xCC, 0x78,
0x00, 0x48, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x60, 0x10, 0x00, 0x78, 0xCC,
0x00, 0x48, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x60, 0x10, 0x00,
0x78, 0xCC,
0xCC, 0xCC, 0x78,
0x30, 0x48, 0x84, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x60, 0x10, 0x00, 0xCC,
0x30, 0x48, 0x84, 0x00, 0xCC, 0xCC, 0xCC, 0x76, 0x60, 0x10, 0x00,
0xCC,
0xCC, 0xCC, 0xCC, 0x76,
0x48, 0x00, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8, 0x44, 0x00, 0x38,
0x6C, 0xC6, 0xC6, 0x6C, 0x38,
@ -177,21 +217,29 @@ static u8 font8x8[2048] =
0x80, 0x78, 0x04, 0xF8, 0xCC,
0xCC, 0xCC, 0xCC, 0x80, 0x7E, 0x01, 0xC6, 0xE6, 0xD6, 0xCE, 0xC6,
0x00, 0x78, 0x0C, 0x7C,
0xCC, 0x76, 0x00, 0xFE, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0xFC,
0xCC, 0x76, 0x00, 0xFE, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00,
0xFC,
0x00, 0x00, 0x18,
0x18, 0x30, 0x60, 0x66, 0x3C, 0xFF, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00,
0x18, 0x30, 0x60, 0x66, 0x3C, 0xFF, 0x80, 0x80, 0x80, 0x00, 0x00,
0x00, 0x00,
0xFF, 0x01,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xC4, 0x48, 0x50, 0x26, 0x49, 0x82, 0x07,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0xC4, 0x48, 0x50, 0x26,
0x49, 0x82, 0x07,
0x40,
0xC4, 0x48, 0x50, 0x26, 0x4A, 0x9F, 0x02, 0x00, 0x30, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30,
0xC4, 0x48, 0x50, 0x26, 0x4A, 0x9F, 0x02, 0x00, 0x30, 0x00, 0x30,
0x30, 0x30, 0x30, 0x30,
0x00, 0x12, 0x24, 0x48, 0x90, 0x48, 0x24, 0x12, 0x00, 0x48, 0x24, 0x12, 0x09, 0x12, 0x24,
0x00, 0x12, 0x24, 0x48, 0x90, 0x48, 0x24, 0x12, 0x00, 0x48, 0x24,
0x12, 0x09, 0x12, 0x24,
0x48,
0x49, 0x00, 0x92, 0x00, 0x49, 0x00, 0x92, 0x00, 0x6D, 0x00, 0xB6, 0x00, 0x6D, 0x00,
0x49, 0x00, 0x92, 0x00, 0x49, 0x00, 0x92, 0x00, 0x6D, 0x00, 0xB6,
0x00, 0x6D, 0x00,
0xB6, 0x00,
0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0x10, 0x10, 0x10, 0x10, 0x10,
0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0x10, 0x10, 0x10,
0x10, 0x10,
0x10, 0x10, 0x10,
0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xF0,
0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
0xF0,
0x10, 0xF0, 0x10, 0x10,
0x28, 0x28, 0x28, 0x28, 0xE8, 0x28, 0x28, 0x28, 0x00, 0x00, 0x00,
0x00, 0xF8, 0x28, 0x28, 0x28,
@ -208,21 +256,29 @@ static u8 font8x8[2048] =
0x00, 0x00, 0x00, 0x00, 0xFF,
0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10,
0x00, 0x00, 0x00, 0x00,
0xFF, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x10, 0x10,
0xFF, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x10,
0x10,
0x10, 0x10, 0x10,
0x1F, 0x10, 0x1F, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, 0x3F, 0x28, 0x28, 0x28,
0x1F, 0x10, 0x1F, 0x10, 0x10, 0x28, 0x28, 0x28, 0x28, 0x3F, 0x28,
0x28, 0x28,
0x28, 0x2F, 0x20, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x20, 0x2F, 0x28, 0x28,
0x28, 0x28,
0x28, 0x2F, 0x20, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x20,
0x2F, 0x28, 0x28,
0x28,
0x28, 0x28, 0xEF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xEF, 0x28, 0x28,
0x28, 0x28, 0xEF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,
0x00, 0xEF, 0x28, 0x28,
0x28, 0x28, 0x28, 0x2F, 0x20, 0x2F, 0x28, 0x28, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00,
0x28, 0x28, 0x28, 0x2F, 0x20, 0x2F, 0x28, 0x28, 0x00, 0x00, 0x00,
0xFF, 0x00, 0xFF, 0x00,
0x00,
0x28, 0x28, 0x28, 0xEF, 0x00, 0xEF, 0x28, 0x28, 0x10, 0x10, 0x10, 0xFF, 0x00, 0xFF,
0x28, 0x28, 0x28, 0xEF, 0x00, 0xEF, 0x28, 0x28, 0x10, 0x10, 0x10,
0xFF, 0x00, 0xFF,
0x00, 0x00,
0x28, 0x28, 0x28, 0x28, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00,
0x28, 0x28, 0x28, 0x28, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFF, 0x00,
0xFF, 0x10, 0x10,
0x00, 0x00, 0x00, 0x00, 0xFF, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28,
0x00, 0x00, 0x00, 0x00, 0xFF, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28,
0x28,
0x3F, 0x00, 0x00, 0x00,
0x10, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1F, 0x10, 0x1F, 0x10, 0x10,
@ -239,21 +295,29 @@ static u8 font8x8[2048] =
0x00, 0x00, 0x00, 0x02, 0x34,
0x4C, 0x4C, 0x32, 0x00, 0x5C, 0x22, 0x22, 0x3C, 0x44, 0x44, 0x78,
0x7E, 0x42, 0x42, 0x40,
0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x02, 0x7C, 0xA8, 0x28, 0x28, 0x44,
0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x02, 0x7C, 0xA8, 0x28, 0x28,
0x44,
0x00, 0x7E, 0x61,
0x30, 0x18, 0x08, 0x10, 0x20, 0x00, 0x00, 0x08, 0x7F, 0x88, 0x88, 0x88, 0x70,
0x30, 0x18, 0x08, 0x10, 0x20, 0x00, 0x00, 0x08, 0x7F, 0x88, 0x88,
0x88, 0x70,
0x00, 0x00,
0x00, 0x22, 0x44, 0x44, 0x7A, 0x80, 0x00, 0x00, 0x00, 0x7C, 0x10, 0x10, 0x10, 0x10,
0x00, 0x22, 0x44, 0x44, 0x7A, 0x80, 0x00, 0x00, 0x00, 0x7C, 0x10,
0x10, 0x10, 0x10,
0x00,
0x1C, 0x08, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x00, 0x38, 0x44, 0x44, 0x7C, 0x44, 0x44,
0x1C, 0x08, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x00, 0x38, 0x44,
0x44, 0x7C, 0x44, 0x44,
0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0x66, 0x24, 0x66, 0x0C, 0x10, 0x08, 0x1C, 0x22, 0x22, 0x22,
0x3C, 0x66, 0xC3, 0xC3, 0xC3, 0x66, 0x24, 0x66, 0x0C, 0x10, 0x08,
0x1C, 0x22, 0x22, 0x22,
0x1C,
0x00, 0x00, 0x00, 0x00, 0x6C, 0x92, 0x92, 0x6C, 0x00, 0x01, 0x1A, 0x26, 0x2A, 0x32,
0x00, 0x00, 0x00, 0x00, 0x6C, 0x92, 0x92, 0x6C, 0x00, 0x01, 0x1A,
0x26, 0x2A, 0x32,
0x2C, 0x40,
0x00, 0x18, 0x20, 0x20, 0x30, 0x20, 0x20, 0x18, 0x00, 0x3C, 0x42, 0x42, 0x42,
0x00, 0x18, 0x20, 0x20, 0x30, 0x20, 0x20, 0x18, 0x00, 0x3C, 0x42,
0x42, 0x42,
0x42, 0x42, 0x42,
0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x08, 0x08, 0x3E,
0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x08, 0x08,
0x3E,
0x08, 0x08, 0x00, 0x3E,
0x00, 0x10, 0x08, 0x04, 0x08, 0x10, 0x00, 0x3E, 0x00, 0x04, 0x08,
0x10, 0x08, 0x04, 0x00, 0x3E,
@ -270,5 +334,3 @@ static u8 font8x8[2048] =
0x00, 0x00, 0x00, 0x3E, 0x3E,
0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

View File

@ -27,7 +27,8 @@ static vgamode modes[] = {
0x4F, 0x0D, 0x0E, 0x00, 0x00, 0x00, 0x00,
0x9C, 0x0E, 0x8F, 0x28, 0x1F, 0x96, 0xB9, 0xA3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 0x38, 0x39, 0x3A, 0x3B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 0x38, 0x39, 0x3A,
0x3B,
0x3C, 0x3D, 0x3E, 0x3F,
0x0C, 0x00, 0x0F, 0x08, 0x00}},
@ -38,7 +39,8 @@ static vgamode modes[] = {
0x47, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00,
0x9C, 0x8E, 0x8F, 0x28, 0x1F, 0x96, 0xB9, 0xA3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 0x38, 0x39, 0x3A, 0x3B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07, 0x38, 0x39, 0x3A,
0x3B,
0x3C, 0x3D, 0x3E, 0x3F,
0x0C, 0x00, 0x0F, 0x00, 0x00}},
@ -49,7 +51,8 @@ static vgamode modes[] = {
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xEA, 0x0C, 0xDF, 0x28, 0x00, 0xE7, 0x04, 0xE3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0F, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x3A, 0x3B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x3A,
0x3B,
0x3C, 0x3D, 0x3E, 0x3F,
0x01, 0x00, 0x0F, 0x00, 0x00}},
@ -60,7 +63,8 @@ static vgamode modes[] = {
0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x9C, 0x0E, 0x8F, 0x14, 0x00, 0x96, 0xB9, 0xA3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x02, 0x00, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x3A, 0x3B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x3A,
0x3B,
0x3C, 0x3D, 0x3E, 0x3F,
0x01, 0x00, 0x03, 0x00, 0x00}},
@ -71,7 +75,8 @@ static vgamode modes[] = {
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xE9, 0x8B, 0xDF, 0x28, 0x00, 0xE7, 0x04, 0xE3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x0F, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x3A, 0x3B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x3A,
0x3B,
0x3C, 0x3D, 0x3E, 0x3F,
0x01, 0x00, 0x0F, 0x00, 0x00}},
@ -82,7 +87,8 @@ static vgamode modes[] = {
0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x9C, 0x0E, 0x8F, 0x28, 0x40, 0x96, 0xB9, 0xA3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
0x0B,
0x0C, 0x0D, 0x0E, 0x0F,
0x41, 0x00, 0x0F, 0x00, 0x00}},
@ -93,7 +99,8 @@ static vgamode modes[] = {
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x9C, 0x8E, 0x8F, 0x28, 0x00, 0x96, 0xB9, 0xE3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
0x0B,
0x0C, 0x0D, 0x0E, 0x0F,
0x41, 0x00, 0x0F, 0x00, 0x00}},
@ -104,7 +111,8 @@ static vgamode modes[] = {
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xEA, 0xAC, 0xDF, 0x28, 0x00, 0xE7, 0x06, 0xE3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
0x0B,
0x0C, 0x0D, 0x0E, 0x0F,
0x41, 0x00, 0x0F, 0x00, 0x00}},
@ -115,7 +123,8 @@ static vgamode modes[] = {
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xEA, 0xAC, 0xDF, 0x2D, 0x00, 0xE7, 0x06, 0xE3, 0xFF},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x0F, 0xFF},
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A,
0x0B,
0x0C, 0x0D, 0x0E, 0x0F,
0x41, 0x00, 0x0F, 0x00, 0x00}},
};

142
lib/cpu.c
View File

@ -56,7 +56,8 @@ void cpuid(u32 op, u32 * eax, u32 * ebx, u32 * ecx, u32 * edx)
u8 getcpuinfos(cpuinfo * proc)
{
u32 i, maxfunction, maxextended, unused, regeax, regebx, regecx, regedx;
u32 i, maxfunction, maxextended, unused, regeax, regebx,
regecx, regedx;
bool *boolean;
if (!cansetflag(0x00040000))
@ -68,7 +69,8 @@ u8 getcpuinfos(cpuinfo * proc)
maxfunction &= 0xffff;
cpuid(0x80000000, &maxextended, &unused, &unused, &unused);
maxextended &= 0xffff;
if (maxfunction >= 1) {
if (maxfunction >= 1)
{
cpuid(1, &regeax, &regebx, &regecx, &regedx);
proc->stepping = (regeax & 0x0000000F);
proc->models = ((regeax >> 4) & 0x0000000F);
@ -93,7 +95,8 @@ u8 getcpuinfos(cpuinfo * proc)
proc->sse42 = ((regecx >> 20) & 0x00000001);
proc->apic2 = ((regecx >> 21) & 0x00000001);
}
if (maxextended >= 1) {
if (maxextended >= 1)
{
cpuid(0x80000001, &regeax, &regebx, &regecx, &regedx);
proc->mmx2 = ((regedx >> 22) & 0x00000001);
proc->apic = ((regedx >> 9) & 0x00000001);
@ -104,22 +107,29 @@ u8 getcpuinfos(cpuinfo * proc)
proc->msr = ((regedx >> 5) & 0x00000001);
proc->sse4a = ((regecx >> 6) & 0x00000001);
}
if (maxextended >= 4) {
if (maxextended >= 4)
{
int i;
for (i = 0; i < 3; i++) {
for (i = 0; i < 3; i++)
{
cpuid(0x80000002 + i, &regeax, &regebx, &regecx,
&regedx);
memcpy(&regeax, &proc->detectedname[0 + i * 16], 4, 1);
memcpy(&regebx, &proc->detectedname[4 + i * 16], 4, 1);
memcpy(&regecx, &proc->detectedname[8 + i * 16], 4, 1);
memcpy(&regedx, &proc->detectedname[12 + i * 16], 4, 1);
memcpy(&regeax, &proc->detectedname[0 + i * 16], 4,
1);
memcpy(&regebx, &proc->detectedname[4 + i * 16], 4,
1);
memcpy(&regecx, &proc->detectedname[8 + i * 16], 4,
1);
memcpy(&regedx, &proc->detectedname[12 + i * 16],
4, 1);
}
}
boolean = &proc->mmx;
i = 0;
proc->techs[0] = '\000';
for (i = 0; i < sizeof(msg); i++)
if (*(boolean++) == 1) {
if (*(boolean++) == 1)
{
strcat(msg[i], &proc->techs);
strcat(space, &proc->techs);
}
@ -132,10 +142,12 @@ u8 getcpuinfos(cpuinfo * proc)
void show_lightcpu(regs * stack)
{
u32 i;
printf("\33[0mEAX=%Y EBX=%Y ECX=%Y EDX=%Y\r\n", stack->eax, stack->ebx, stack->ecx, stack->edx);
printf("ESI=%Y EDI=%Y ESP=%Y EBP=%Y\r\n", stack->esi, stack->edi, stack->esp, stack->ebp);
printf("EIP=%Y EFL=%Y [%c%c%c%c%c%c%c%c%c]\r\n", stack->eip, stack->eflags,
(stack->eflags & (1 <<11)) ? 'O':'-',
printf("\33[0mEAX=%Y EBX=%Y ECX=%Y EDX=%Y\r\n", stack->eax,
stack->ebx, stack->ecx, stack->edx);
printf("ESI=%Y EDI=%Y ESP=%Y EBP=%Y\r\n", stack->esi, stack->edi,
stack->esp, stack->ebp);
printf("EIP=%Y EFL=%Y [%c%c%c%c%c%c%c%c%c]\r\n", stack->eip,
stack->eflags, (stack->eflags & (1 << 11)) ? 'O' : '-',
(stack->eflags & (1 << 10)) ? 'D' : '-',
(stack->eflags & (1 << 9)) ? 'I' : '-',
(stack->eflags & (1 << 8)) ? 'T' : '-',
@ -144,20 +156,27 @@ void show_lightcpu(regs *stack)
(stack->eflags & (1 << 4)) ? 'A' : '-',
(stack->eflags & (1 << 2)) ? 'P' : '-',
(stack->eflags & (1 << 0)) ? 'C' : '-');
printf("CS =%hY DS =%hY SS =%hY ES =%hY FS =%hY GS =%hY\r\n",stack->cs,stack->ds,stack->ss,stack->es,stack->fs,stack->gs);
printf("CR0=%Y CR2=%Y CR3=%Y CR4=%Y\r\n\r\n\r\n",stack->cr0,stack->cr2,stack->cr3,stack->cr4);
printf("CS =%hY DS =%hY SS =%hY ES =%hY FS =%hY GS =%hY\r\n",
stack->cs, stack->ds, stack->ss, stack->es, stack->fs,
stack->gs);
printf("CR0=%Y CR2=%Y CR3=%Y CR4=%Y\r\n\r\n\r\n", stack->cr0,
stack->cr2, stack->cr3, stack->cr4);
u8 *size;
u8 *pointer;
for(i=20;i<50;i++) {
for (i = 20; i < 50; i++)
{
pointer = stack->eip - i;
size = pointer;
size += 50;
while(pointer<size) {
while (pointer < size)
{
pointer += disasm(pointer, NULL, false);
if (pointer==stack->eip) break;
if (pointer == stack->eip)
break;
}
if (pointer==stack->eip) break;
if (pointer == stack->eip)
break;
}
if (pointer == stack->eip)
pointer = stack->eip - i;
@ -180,11 +199,15 @@ void show_lightcpu(regs *stack)
else
{
i = 0;
for (u32 *pointer = stack->esp; pointer < KERNEL_STACK_ADDR; pointer ++) {
if (i>0 && i % 10 == 0) print("\033[10A");
for (u32 * pointer = stack->esp;
pointer < KERNEL_STACK_ADDR; pointer++)
{
if (i > 0 && i % 10 == 0)
print("\033[10A");
if (i >= 10)
print("\033[25C");
printf("+%d:%Y - %Y\r\n", i++, pointer, (u32)(*pointer));
printf("+%d:%Y - %Y\r\n", i++, pointer,
(u32) (*pointer));
}
for (u32 j = 0; j < 10 - (i % 10); j++)
print("\033[01B");
@ -196,10 +219,12 @@ void show_lightcpu(regs *stack)
void show_cpu(regs * stack)
{
printf("EAX=%Y EBX=%Y ECX=%Y EDX=%Y\r\n", stack->eax, stack->ebx, stack->ecx, stack->edx);
printf("ESI=%Y EDI=%Y ESP=%Y EBP=%Y\r\n", stack->esi, stack->edi, stack->esp, stack->ebp);
printf("EIP=%Y EFL=%Y [%c%c%c%c%c%c%c%c%c]\r\n", stack->eip, stack->eflags,
(stack->eflags & (1 <<11)) ? 'O':'-',
printf("EAX=%Y EBX=%Y ECX=%Y EDX=%Y\r\n", stack->eax, stack->ebx,
stack->ecx, stack->edx);
printf("ESI=%Y EDI=%Y ESP=%Y EBP=%Y\r\n", stack->esi, stack->edi,
stack->esp, stack->ebp);
printf("EIP=%Y EFL=%Y [%c%c%c%c%c%c%c%c%c]\r\n", stack->eip,
stack->eflags, (stack->eflags & (1 << 11)) ? 'O' : '-',
(stack->eflags & (1 << 10)) ? 'D' : '-',
(stack->eflags & (1 << 9)) ? 'I' : '-',
(stack->eflags & (1 << 8)) ? 'T' : '-',
@ -208,23 +233,58 @@ void show_cpu(regs *stack)
(stack->eflags & (1 << 4)) ? 'A' : '-',
(stack->eflags & (1 << 2)) ? 'P' : '-',
(stack->eflags & (1 << 0)) ? 'C' : '-');
printf("CS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n",stack->cs,getdesbase(stack->cs),getdeslimit(stack->cs),getdesdpl(stack->cs),getdestype(stack->cs),getdessize(stack->cs),getdesbit3(stack->cs),getdesbit2(stack->cs),getdesbit1(stack->cs),getdesalign(stack->cs));
printf("DS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n",stack->ds,getdesbase(stack->ds),getdeslimit(stack->ds),getdesdpl(stack->ds),getdestype(stack->ds),getdessize(stack->ds),getdesbit3(stack->ds),getdesbit2(stack->ds),getdesbit1(stack->ds),getdesalign(stack->ds));
printf("SS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n",stack->ss,getdesbase(stack->ss),getdeslimit(stack->ss),getdesdpl(stack->ss),getdestype(stack->ss),getdessize(stack->ss),getdesbit3(stack->ss),getdesbit2(stack->ss),getdesbit1(stack->ss),getdesalign(stack->ss));
printf("ES =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n",stack->es,getdesbase(stack->es),getdeslimit(stack->es),getdesdpl(stack->es),getdestype(stack->es),getdessize(stack->es),getdesbit3(stack->es),getdesbit2(stack->es),getdesbit1(stack->es),getdesalign(stack->es));
printf("FS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n",stack->fs,getdesbase(stack->fs),getdeslimit(stack->fs),getdesdpl(stack->fs),getdestype(stack->fs),getdessize(stack->fs),getdesbit3(stack->fs),getdesbit2(stack->fs),getdesbit1(stack->fs),getdesalign(stack->fs));
printf("GS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n",stack->gs,getdesbase(stack->gs),getdeslimit(stack->gs),getdesdpl(stack->gs),getdestype(stack->gs),getdessize(stack->gs),getdesbit3(stack->gs),getdesbit2(stack->gs),getdesbit1(stack->gs),getdesalign(stack->gs));
printf("CS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n", stack->cs,
getdesbase(stack->cs), getdeslimit(stack->cs),
getdesdpl(stack->cs), getdestype(stack->cs),
getdessize(stack->cs), getdesbit3(stack->cs),
getdesbit2(stack->cs), getdesbit1(stack->cs),
getdesalign(stack->cs));
printf("DS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n", stack->ds,
getdesbase(stack->ds), getdeslimit(stack->ds),
getdesdpl(stack->ds), getdestype(stack->ds),
getdessize(stack->ds), getdesbit3(stack->ds),
getdesbit2(stack->ds), getdesbit1(stack->ds),
getdesalign(stack->ds));
printf("SS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n", stack->ss,
getdesbase(stack->ss), getdeslimit(stack->ss),
getdesdpl(stack->ss), getdestype(stack->ss),
getdessize(stack->ss), getdesbit3(stack->ss),
getdesbit2(stack->ss), getdesbit1(stack->ss),
getdesalign(stack->ss));
printf("ES =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n", stack->es,
getdesbase(stack->es), getdeslimit(stack->es),
getdesdpl(stack->es), getdestype(stack->es),
getdessize(stack->es), getdesbit3(stack->es),
getdesbit2(stack->es), getdesbit1(stack->es),
getdesalign(stack->es));
printf("FS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n", stack->fs,
getdesbase(stack->fs), getdeslimit(stack->fs),
getdesdpl(stack->fs), getdestype(stack->fs),
getdessize(stack->fs), getdesbit3(stack->fs),
getdesbit2(stack->fs), getdesbit1(stack->fs),
getdesalign(stack->fs));
printf("GS =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n", stack->gs,
getdesbase(stack->gs), getdeslimit(stack->gs),
getdesdpl(stack->gs), getdestype(stack->gs),
getdessize(stack->gs), getdesbit3(stack->gs),
getdesbit2(stack->gs), getdesbit1(stack->gs),
getdesalign(stack->gs));
u32 tss;
str(tss);
printf("TR =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n",stack->gs,getdesbase(tss),getdeslimit(tss),getdesdpl(tss),getdestype(tss),getdessize(tss),getdesbit3(tss),getdesbit2(tss),getdesbit1(tss),getdesalign(tss));
printf("TR =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\r\n", stack->gs,
getdesbase(tss), getdeslimit(tss), getdesdpl(tss),
getdestype(tss), getdessize(tss), getdesbit3(tss),
getdesbit2(tss), getdesbit1(tss), getdesalign(tss));
struct gdtr gdtreg;
sgdt(&gdtreg);
printf("GDT= %Y %Y\r\n", gdtreg.base, gdtreg.limite);
struct idtr idtreg;
sidt(&idtreg);
printf("IDT= %Y %Y\r\n", idtreg.base, idtreg.limite);
printf("CR0=%Y CR2=%Y CR3=%Y CR4=%Y\r\n",stack->cr0,stack->cr2,stack->cr3,stack->cr4);
printf("DR0=%Y DR1=%Y DR2=%Y DR3=%Y\r\n",stack->dr0,stack->dr1,stack->dr2,stack->dr3);
printf("CR0=%Y CR2=%Y CR3=%Y CR4=%Y\r\n", stack->cr0, stack->cr2,
stack->cr3, stack->cr4);
printf("DR0=%Y DR1=%Y DR2=%Y DR3=%Y\r\n", stack->dr0, stack->dr1,
stack->dr2, stack->dr3);
printf("DR6=%Y DR7=%Y\r\n", stack->dr6, stack->dr7);
printf("EFER=%lY\r\n", stack->efer);
printf("STACK\r\n");
@ -233,11 +293,15 @@ void show_cpu(regs *stack)
else
{
u32 i = 0;
for (u32 *pointer = stack->esp; pointer < KERNEL_STACK_ADDR; pointer ++) {
if (i>0 && i % 10 == 0) print("\033[10A");
for (u32 * pointer = stack->esp;
pointer < KERNEL_STACK_ADDR; pointer++)
{
if (i > 0 && i % 10 == 0)
print("\033[10A");
if (i >= 10)
print("\033[25C");
printf("+%d:%Y - %Y\r\n", i++, pointer, (u32)(*pointer));
printf("+%d:%Y - %Y\r\n", i++, pointer,
(u32) (*pointer));
}
for (u32 j = 0; j < 10 - (i % 10); j++)
print("\033[01B");

File diff suppressed because it is too large Load Diff

View File

@ -90,7 +90,8 @@ u32 getdesbase(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
return (entry[index].base0_15+(entry[index].base16_23<<16)+(entry[index].base24_31<<24));
return (entry[index].base0_15 + (entry[index].base16_23 << 16) +
(entry[index].base24_31 << 24));
}
/*******************************************************************************/
@ -110,7 +111,7 @@ u32 getdesdpl(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
return (entry[index].acces>>5 & 0b11);
return (entry[index].acces >> 5 & 0x03);
}
/*******************************************************************************/
@ -120,10 +121,13 @@ u8 getdestype(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
if (((entry[index].acces & 0b10100) == 0) && ((entry[index].acces & 0b01000) > 0) && ((entry[index].acces & 0b0001) > 0) && ((entry[index].flags & 0b0110) == 0))
if (((entry[index].acces & 0x14) == 0)
&& ((entry[index].acces & 0x08) > 0)
&& ((entry[index].acces & 0x01) > 0)
&& ((entry[index].flags & 0x06) == 0))
return 'T';
else
return (((entry[index].acces & 0b1000) > 0) ? 'C' : 'D');
return (((entry[index].acces & 0x08) > 0) ? 'C' : 'D');
}
/*******************************************************************************/
@ -133,10 +137,13 @@ u8 getdesbit1(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
if (((entry[index].acces & 0b10100) == 0) && ((entry[index].acces & 0b01000) > 0) && ((entry[index].acces & 0b0001) > 0) && ((entry[index].flags & 0b0110) == 0))
return (((entry[index].acces & 0b10) > 0) ? 'B' : '-');
if (((entry[index].acces & 0x14) == 0)
&& ((entry[index].acces & 0x08) > 0)
&& ((entry[index].acces & 0x01) > 0)
&& ((entry[index].flags & 0x06) == 0))
return (((entry[index].acces & 0x04) > 0) ? 'B' : '-');
else
return (((entry[index].acces & 0b1) > 0) ? 'A' : '-');
return (((entry[index].acces & 0x01) > 0) ? 'A' : '-');
}
/*******************************************************************************/
@ -146,12 +153,15 @@ u8 getdesbit2(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
if (((entry[index].acces & 0b10100) == 0) && ((entry[index].acces & 0b01000) > 0) && ((entry[index].acces & 0b0001) > 0) && ((entry[index].flags & 0b0110) == 0))
return (((entry[index].flags & 0b1) > 0) ? 'U' : '-');
else if ((entry[index].acces & 0b1000) > 0)
return (((entry[index].acces & 0b10) > 0) ? 'R' : '-');
if (((entry[index].acces & 0x20) == 0)
&& ((entry[index].acces & 0x08) > 0)
&& ((entry[index].acces & 0x01) > 0)
&& ((entry[index].flags & 0x06) == 0))
return (((entry[index].flags & 0x01) > 0) ? 'U' : '-');
else if ((entry[index].acces & 0x8) > 0)
return (((entry[index].acces & 0x02) > 0) ? 'R' : '-');
else
return (((entry[index].acces & 0b10) > 0) ? 'W' : 'R');
return (((entry[index].acces & 0x02) > 0) ? 'W' : 'R');
}
/*******************************************************************************/
@ -161,10 +171,10 @@ u8 getdesbit3(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
if ((entry[index].acces & 0b1000) > 0)
return (((entry[index].acces & 0b100) > 0) ? 'C' : '-');
if ((entry[index].acces & 0x08) > 0)
return (((entry[index].acces & 0x04) > 0) ? 'C' : '-');
else
return (((entry[index].acces & 0b100) > 0) ? 'D' : 'U');
return (((entry[index].acces & 0x04) > 0) ? 'D' : 'U');
}
/*******************************************************************************/
@ -174,7 +184,7 @@ u16 getdesalign(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
return (((entry[index].flags & 0b1000) > 0) ? 4096: 1);
return (((entry[index].flags & 0x08) > 0) ? 4096 : 1);
}
/*******************************************************************************/
@ -184,7 +194,7 @@ bool isdesvalid(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
return ((entry[index].acces & 0b10000000) > 0);
return ((entry[index].acces & 0x80) > 0);
}
/*******************************************************************************/
@ -194,10 +204,13 @@ u32 getdessize(u16 sel)
{
gdtdes *entry = GDT_ADDR;
u8 index = sel / sizeof(gdtdes);
if (((entry[index].acces & 0b10100) == 0) && ((entry[index].acces & 0b01000) > 0) && ((entry[index].acces & 0b0001) > 0) && ((entry[index].flags & 0b0110) == 0))
if (((entry[index].acces & 0x14) == 0)
&& ((entry[index].acces & 0x08) > 0)
&& ((entry[index].acces & 0x01) > 0)
&& ((entry[index].flags & 0x06) == 0))
return 32;
else
return (((entry[index].flags & 0b1000) > 0) ? 32 : 16);
return (((entry[index].flags & 0x08) > 0) ? 32 : 16);
}
/*******************************************************************************/
/* Créé un descripteur GDT */

View File

@ -148,7 +148,8 @@ void putidt(u32 offset, u16 select, u16 type, u16 index)
void cpuerror(const u8 * src, const regs * stack)
{
printf("\033[31m*** ERREUR CPU : %s *** \r\n", src);
if (stack!=NULL) show_cpu(stack);
if (stack != NULL)
show_cpu(stack);
print("<Appuyer une touche pour continuer>\033[0m\r\n");
sti();
waitascii();
@ -210,7 +211,9 @@ void exception1()
u8 ascii = waitascii();
cli();
if (ascii == 'P' || ascii == 'p')
setdebugreg(0,current->eip+disasm(current->eip, NULL, false), DBG_EXEC);
setdebugreg(0,
current->eip + disasm(current->eip, NULL,
false), DBG_EXEC);
else if (ascii == 'D' || ascii == 'd')
setdebugreg(0, 0, DBG_CLEAR);
else if (ascii == 'C' || ascii == 'c')
@ -406,15 +409,25 @@ void exception13()
cpuerror("#GP General protection fault (GPF)", dump);
}
static u8 ex14_errors1[]="Supervisory process tried to read a non-present page entry";
static u8 ex14_errors2[]="Supervisory process tried to read a page and caused a protection fault";
static u8 ex14_errors3[]="Supervisory process tried to write to a non-present page entry";
static u8 ex14_errors4[]="Supervisory process tried to write a page and caused a protection fault";
static u8 ex14_errors5[]="User process tried to read a non-present page entry";
static u8 ex14_errors6[]="User process tried to read a page and caused a protection fault";
static u8 ex14_errors7[]="User process tried to write to a non-present page entry";
static u8 ex14_errors8[]="User process tried to write a page and caused a protection fault";
static u8 *ex14_errors[]={&ex14_errors1,&ex14_errors2,&ex14_errors3,&ex14_errors4,&ex14_errors5,&ex14_errors6,&ex14_errors7,&ex14_errors8};
static u8 ex14_errors1[] =
"Supervisory process tried to read a non-present page entry";
static u8 ex14_errors2[] =
"Supervisory process tried to read a page and caused a protection fault";
static u8 ex14_errors3[] =
"Supervisory process tried to write to a non-present page entry";
static u8 ex14_errors4[] =
"Supervisory process tried to write a page and caused a protection fault";
static u8 ex14_errors5[] =
"User process tried to read a non-present page entry";
static u8 ex14_errors6[] =
"User process tried to read a page and caused a protection fault";
static u8 ex14_errors7[] =
"User process tried to write to a non-present page entry";
static u8 ex14_errors8[] =
"User process tried to write a page and caused a protection fault";
static u8 *ex14_errors[] =
{ &ex14_errors1, &ex14_errors2, &ex14_errors3, &ex14_errors4,
&ex14_errors5, &ex14_errors6, &ex14_errors7, &ex14_errors8 };
void exception14()
{
@ -430,10 +443,15 @@ void exception14()
dump->eip = current->eip;
if (dump->cr2 >= USER_CODE && dump->cr2 < USER_STACK)
{
virtual_range_new(getcurrentprocess()->pdd, (u8 *) (dump->cr2 & 0xFFFFF000), PAGESIZE, PAGE_ALL);
virtual_range_new(getcurrentprocess()->pdd,
(u8 *) (dump->cr2 & 0xFFFFF000),
PAGESIZE, PAGE_ALL);
}
else {
printf("Page fault - %s at adress %Y cs:eip - %Y:%Y\r\n",ex14_errors[current->error_code & 0xF],dump->cr2,dump->cs,dump->eip);
else
{
printf("Page fault - %s at adress %Y cs:eip - %Y:%Y\r\n",
ex14_errors[current->error_code & 0xF], dump->cr2,
dump->cs, dump->eip);
cpuerror("#PGF Page fault", dump);
}
restdebugcpu();
@ -743,49 +761,90 @@ void irq15()
void initidt(void)
{
u16 i;
putidt((u32) exception0, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 0);
putidt((u32) exception1, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 1);
putidt((u32) exception2, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 2);
putidt((u32) exception3, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 3);
putidt((u32) exception4, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 4);
putidt((u32) exception5, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 5);
putidt((u32) exception6, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 6);
putidt((u32) exception7, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 7);
putidt((u32) exception8, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 8);
putidt((u32) exception9, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 9);
putidt((u32) exception10, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 10);
putidt((u32) exception11, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 11);
putidt((u32) exception12, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 12);
putidt((u32) exception13, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 13);
putidt((u32) exception14, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 14);
putidt((u32) exception15, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 15);
putidt((u32) exception16, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 16);
putidt((u32) exception17, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 17);
putidt((u32) exception18, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 18);
for (i = 19; i < 32; i++) {
putidt((u32) interruption, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING3 | TRAPGATE, i);
putidt((u32) exception0, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 0);
putidt((u32) exception1, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 1);
putidt((u32) exception2, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 2);
putidt((u32) exception3, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 3);
putidt((u32) exception4, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 4);
putidt((u32) exception5, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 5);
putidt((u32) exception6, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 6);
putidt((u32) exception7, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 7);
putidt((u32) exception8, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 8);
putidt((u32) exception9, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 9);
putidt((u32) exception10, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 10);
putidt((u32) exception11, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 11);
putidt((u32) exception12, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 12);
putidt((u32) exception13, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 13);
putidt((u32) exception14, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 14);
putidt((u32) exception15, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 15);
putidt((u32) exception16, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 16);
putidt((u32) exception17, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 17);
putidt((u32) exception18, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 18);
for (i = 19; i < 32; i++)
{
putidt((u32) interruption, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING3 | TRAPGATE, i);
}
putidt((u32) irq0, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 32);
putidt((u32) irq1, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 33);
putidt((u32) irq2, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 34);
putidt((u32) irq3, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 35);
putidt((u32) irq4, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 36);
putidt((u32) irq5, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 37);
putidt((u32) irq6, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 38);
putidt((u32) irq7, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 39);
for (i = 40; i < 96; i++) {
putidt((u32) interruption, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING3 | TRAPGATE, i);
putidt((u32) irq0, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 32);
putidt((u32) irq1, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 33);
putidt((u32) irq2, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 34);
putidt((u32) irq3, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 35);
putidt((u32) irq4, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 36);
putidt((u32) irq5, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 37);
putidt((u32) irq6, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 38);
putidt((u32) irq7, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 39);
for (i = 40; i < 96; i++)
{
putidt((u32) interruption, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING3 | TRAPGATE, i);
}
putidt((u32) irq8, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 96);
putidt((u32) irq9, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 97);
putidt((u32) irq10, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 98);
putidt((u32) irq11, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 99);
putidt((u32) irq12, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 100);
putidt((u32) irq13, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 101);
putidt((u32) irq14, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 102);
putidt((u32) irq15, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 103);
for (i = 104; i < IDT_SIZE; i++) {
putidt((u32) interruption, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | TRAPGATE, i);
putidt((u32) irq8, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 96);
putidt((u32) irq9, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 97);
putidt((u32) irq10, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 98);
putidt((u32) irq11, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 99);
putidt((u32) irq12, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 100);
putidt((u32) irq13, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 101);
putidt((u32) irq14, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 102);
putidt((u32) irq15, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 103);
for (i = 104; i < IDT_SIZE; i++)
{
putidt((u32) interruption, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | TRAPGATE, i);
}
/* initialise le registre idt */
idtreg.limite = IDT_SIZE * sizeof(idtdes);

View File

@ -103,12 +103,16 @@ u8 *getstring(u8 * temp)
u8 maxwidth = strlen(temp);
u8 *pointer = temp;
u8 ascii = 0;
while (ascii != '\r') {
while (ascii != '\r')
{
ascii = waitascii();
if (ascii == '\b' && pointer > temp) {
if (ascii == '\b' && pointer > temp)
{
pointer--;
putchar(ascii);
} else if (ascii > 31 && pointer <= temp + 80) {
}
else if (ascii > 31 && pointer <= temp + 80)
{
*pointer++ = ascii;
putchar(ascii);
}
@ -136,7 +140,8 @@ void outkbd(u8 port, u8 data)
u8 state;
/* timeout */
for (timeout = 500000L; timeout != 0; timeout--) {
for (timeout = 500000L; timeout != 0; timeout--)
{
state = inb(0x64);
/* vide le buffer du 8042 */
if ((state & 0x02) == 0)
@ -154,13 +159,16 @@ void reboot(void)
u8 temp;
cli();
/* vide le 8042 */
do {
do
{
temp = inb(0x64);
if ((temp & 0x01) != 0) {
if ((temp & 0x01) != 0)
{
(void) inb(0x60);
continue;
}
} while ((temp & 0x02) != 0);
}
while ((temp & 0x02) != 0);
/* active le reset CPU */
outb(0x64, 0xFE);
while (1)
@ -185,13 +193,16 @@ unsigned convert(u32 keypressed)
breakcode = 1;
key = (keypressed & 0x7F);
/* Mise a jour des flags lors du relachement de touches de controle */
if (breakcode) {
if (key == SCAN_ALT) {
if (breakcode)
{
if (key == SCAN_ALT)
{
kbdstatus &= ~STATUS_ALT;
/* si ALT GR (E01D) alors activer aussi control */
if (bufferscan[lastscan] == 0xE0)
kbdstatus &= ~STATUS_CTRL;
} else if (key == SCAN_CTRL)
}
else if (key == SCAN_CTRL)
kbdstatus &= ~STATUS_CTRL;
else if (key == SCAN_LEFTSHIFT || key == SCAN_RIGHTSHIFT)
kbdstatus &= ~STATUS_SHIFT;
@ -199,41 +210,54 @@ unsigned convert(u32 keypressed)
return 0;
}
/* Mise a jour des flags lors de l'appuie de touches de controle */
if (key == SCAN_ALT) {
if (key == SCAN_ALT)
{
kbdstatus |= STATUS_ALT;
/* si ALT GR (E01D) alors desactiver aussi control */
if (bufferscan[lastscan] == 0xE0)
kbdstatus |= STATUS_CTRL;
return 0;
} else if (key == SCAN_CTRL) {
}
else if (key == SCAN_CTRL)
{
kbdstatus |= STATUS_CTRL;
return 0;
} else if (key == SCAN_LEFTSHIFT || key == SCAN_RIGHTSHIFT) {
}
else if (key == SCAN_LEFTSHIFT || key == SCAN_RIGHTSHIFT)
{
kbdstatus |= STATUS_SHIFT;
return 0;
}
else if ((key >= SCAN_F1) && (key <= SCAN_F8)) {
else if ((key >= SCAN_F1) && (key <= SCAN_F8))
{
changevc(key - SCAN_F1);
}
else if (key == SCAN_F9) {
else if (key == SCAN_F9)
{
regs dump;
show_cpu(&dump);
}
else if (key == SCAN_F10) {
else if (key == SCAN_F10)
{
apply_nextvideomode();
}
/* Scroll Lock, Num Lock, and Caps Lock mise a jour des leds */
else if (key == SCAN_SCROLLLOCK) {
else if (key == SCAN_SCROLLLOCK)
{
kbdstatus ^= STATUS_SCRL;
goto LEDS;
} else if (key == SCAN_NUMLOCK) {
}
else if (key == SCAN_NUMLOCK)
{
kbdstatus ^= STATUS_NUM;
goto LEDS;
} else if (key == SCAN_CAPSLOCK) {
}
else if (key == SCAN_CAPSLOCK)
{
kbdstatus ^= STATUS_CAPS;
LEDS:
outkbd(0x60, 0xED); /* "mise a jour des LEDS */
@ -248,8 +272,9 @@ unsigned convert(u32 keypressed)
return 0;
}
/* Appuie de CRTL + ALT + SUPR ? */
if ((kbdstatus & STATUS_CTRL) && (kbdstatus & STATUS_ALT) &&
(key == 73)) {
if ((kbdstatus & STATUS_CTRL) && (kbdstatus & STATUS_ALT)
&& (key == 73))
{
print("redemarrage du systeme");
reboot();
}
@ -296,14 +321,17 @@ unsigned convert(u32 keypressed)
if (key == 0x4f)
return 0x19;
return 0x00;
} else {
}
else
{
/* detecte les SCANCODES invalides */
if (key >= sizeof(set1_normal) / sizeof(set1_normal[0]))
return 0;
/* converti le scancode en code ASCII en fonction du statut*/
if (kbdstatus & STATUS_SHIFT || kbdstatus & STATUS_CAPS)
temp = set1_shift[key];
else if ((kbdstatus & STATUS_ALT) && (kbdstatus & STATUS_CTRL))
else if ((kbdstatus & STATUS_ALT)
&& (kbdstatus & STATUS_CTRL))
temp = set1_altgr[key];
else if (kbdstatus & STATUS_CTRL)
temp = set1_ctrl[key];
@ -332,7 +360,8 @@ void keyboard(void)
while ((inb(0x64) & 1) == 0);
scancode = inb(0x60);
ascii = convert(scancode);
if (ascii != 0) {
if (ascii != 0)
{
ptrascii++;
if (ptrascii == 255)
ptrascii == 0;

View File

@ -8,25 +8,21 @@
/*******************************************************************************/
/* Arithmétique 64 bits */
unsigned long long __udivdi3 (unsigned long long num, unsigned long long den)
unsigned long long __udivdi3(unsigned long long num,
unsigned long long den)
{
unsigned long long quot, qbit;
quot = 0;
qbit = 1;
if (den == 0)
{
return 0;
}
while ((long long) den >= 0)
{
den <<= 1;
qbit <<= 1;
}
while (qbit)
{
if (den <= num)
@ -37,9 +33,7 @@ unsigned long long __udivdi3 (unsigned long long num, unsigned long long den)
den >>= 1;
qbit >>= 1;
}
return quot;
}
unsigned long long __umoddi3(unsigned long long n, unsigned long long d)
@ -50,29 +44,45 @@ unsigned long long __umoddi3 (unsigned long long n, unsigned long long d)
/******************************************************************************/
/* Fonctions qui retournent le sinus et cosinus */
double cos(double x){
double cos(double x)
{
if (x < 0.0)
x = -x;
while (M_PI < x)
x -= M_2_PI;
double result=1.0 - (x*x/2.0)*( 1.0 - (x*x/12.0) * ( 1.0 - (x*x/30.0) * (1.0 - x*x/56.0 )));
double result =
1.0 - (x * x / 2.0) * (1.0 -
(x * x / 12.0) * (1.0 -
(x * x / 30.0) *
(1.0 -
x * x / 56.0)));
return result;
}
double sin(double x){
double sin(double x)
{
return cos(x - M_PI_2);
}
float cosf(float x){
float cosf(float x)
{
if (x < 0.0f)
x = -x;
while (M_PI < x)
x -= M_2_PI;
float result=1.0f - (x*x/2.0f)*( 1.0f - (x*x/12.0f) * ( 1.0f - (x*x/30.0f) * (1.0f - x*x/56.0f )));
float result =
1.0f - (x * x / 2.0f) * (1.0f -
(x * x / 12.0f) * (1.0f -
(x * x /
30.0f) *
(1.0f -
x * x /
56.0f)));
return result;
}
float sinf(float x){
float sinf(float x)
{
return cosf(x - M_PI_2);
}
@ -94,7 +104,6 @@ double fabs(double n)
float sqrtf(float n)
{
float x = n;
float y = 1;
double e = 0.000001;
@ -108,7 +117,6 @@ float sqrtf(float n)
double sqrt(double n)
{
double x = n;
double y = 1;
double e = 0.000001;
@ -136,9 +144,11 @@ double rsqrt(double n)
/******************************************************************************/
/* Fonction qui retourne la puissance n de a */
u32 pow(u32 a, u8 n) {
u32 pow(u32 a, u8 n)
{
u32 r = 1;
while (n > 0) {
while (n > 0)
{
if (n & 1)
r *= a;
a *= a;
@ -152,22 +162,18 @@ u32 pow(u32 a, u8 n) {
u8 log2(u64 n)
{
if (n == 0)
return 0;
int logValue = -1;
while (n) {
while (n)
{
logValue++;
n >>= 1;
}
return logValue + 1;
}
/******************************************************************************/
@ -176,15 +182,22 @@ return logValue + 1;
u8 log10(u64 n)
{
return (n >= 10000000000000000000u) ? 19 : (n >= 100000000000000000u) ? 18 :
(n >= 100000000000000000u) ? 17 : (n >= 10000000000000000u) ? 16 :
(n >= 1000000000000000u) ? 15 : (n >= 100000000000000u) ? 14 :
(n >= 10000000000000u) ? 13 : (n >= 1000000000000u) ? 12 :
(n >= 100000000000u) ? 11 : (n >= 10000000000u) ? 10 :
(n >= 1000000000u) ? 9 : (n >= 100000000u) ? 8 :
(n >= 10000000u) ? 7 : (n >= 1000000u) ? 6 :
(n >= 100000u) ? 5 : (n >= 10000u) ? 4 :
(n >= 1000u) ? 3 : (n >= 100u) ? 2 : (n >= 10u) ? 1u : 0u;
return (n >= 10000000000000000000u) ? 19 : (n >=
100000000000000000u) ?
18 : (n >= 100000000000000000u) ? 17 : (n >=
10000000000000000u)
? 16 : (n >= 1000000000000000u) ? 15 : (n >=
100000000000000u) ?
14 : (n >= 10000000000000u) ? 13 : (n >=
1000000000000u) ? 12
: (n >= 100000000000u) ? 11 : (n >=
10000000000u) ? 10 : (n >=
1000000000u)
? 9 : (n >= 100000000u) ? 8 : (n >= 10000000u) ? 7 : (n >=
1000000u)
? 6 : (n >= 100000u) ? 5 : (n >= 10000u) ? 4 : (n >=
1000u) ? 3
: (n >= 100u) ? 2 : (n >= 10u) ? 1u : 0u;
}
@ -194,13 +207,11 @@ return (n >= 10000000000000000000u) ? 19 : (n >= 100000000000000000u) ? 18 :
u32 abs(int x)
{
if (x < 0)
x = -x;
return (u32) x;
}
/******************************************************************************/
@ -208,12 +219,9 @@ return (u32) x;
static u32 seed = 0x12341234;
void randomize(void)
{
seed = gettimer();
}
@ -237,7 +245,6 @@ result <<= 10;
result ^= (unsigned int) (next / 65536) % 1024;
seed = next;
return result;
}
/******************************************************************************/

View File

@ -10,7 +10,8 @@
void vector4_show(vector4 src)
{
printf("vecteur: X=%f Y=%f Z=%f W=%f \r\n", src.x, src.y, src.z, src.w);
printf("vecteur: X=%f Y=%f Z=%f W=%f \r\n", src.x, src.y, src.z,
src.w);
}
/*******************************************************************************/
@ -165,9 +166,7 @@ void vector4_rotate_z(vector4 *dst, float angle)
float vector4_len(vector4 src)
{
return sqrtf((src.x * src.x) +
(src.y * src.y) +
(src.z * src.z));
return sqrtf((src.x * src.x) + (src.y * src.y) + (src.z * src.z));
}
/*******************************************************************************/
@ -183,9 +182,7 @@ float vector4_dotproduct(vector4 v1, vector4 v2)
float vector4_norm(vector4 src)
{
return sqrtf((src.x * src.x) +
(src.y * src.y) +
(src.z * src.z));
return sqrtf((src.x * src.x) + (src.y * src.y) + (src.z * src.z));
}
/*******************************************************************************/
@ -193,8 +190,7 @@ float vector4_norm(vector4 src)
float vector4_distance(vector4 v1, vector4 v2)
{
return sqrt(pow(v2.x - v1.x, 2) +
pow(v2.y - v1.y, 2) +
return sqrt(pow(v2.x - v1.x, 2) + pow(v2.y - v1.y, 2) +
pow(v2.z - v1.z, 2));
}
@ -280,7 +276,8 @@ void matrix44_scale(matrix44 *dst, float factor)
/*******************************************************************************/
/* Créé une matrice de redimensionnement et de déplacement */
void matrix44_scale_translation(vector4 scale, vector4 translation, matrix44 *dst)
void matrix44_scale_translation(vector4 scale, vector4 translation,
matrix44 * dst)
{
matrix44_homogen(dst);
dst->V[0].x = scale.x;
@ -379,37 +376,53 @@ void matrix44_rotation(vector4 axis, float angle, matrix44 *dst)
void matrix44_multiply(matrix44 * m1, matrix44 * m2, matrix44 * dst)
{
dst->V[0].x = (m1->V[0].x * m2->V[0].x + m1->V[0].y * m2->V[1].x +
dst->V[0].x =
(m1->V[0].x * m2->V[0].x + m1->V[0].y * m2->V[1].x +
m1->V[0].z * m2->V[2].x + m1->V[0].w * m2->V[3].x);
dst->V[0].y = (m1->V[0].x * m2->V[0].y + m1->V[0].y * m2->V[1].y +
dst->V[0].y =
(m1->V[0].x * m2->V[0].y + m1->V[0].y * m2->V[1].y +
m1->V[0].z * m2->V[2].y + m1->V[0].w * m2->V[3].y);
dst->V[0].z = (m1->V[0].x * m2->V[0].z + m1->V[0].y * m2->V[1].z +
dst->V[0].z =
(m1->V[0].x * m2->V[0].z + m1->V[0].y * m2->V[1].z +
m1->V[0].z * m2->V[2].z + m1->V[0].w * m2->V[3].z);
dst->V[0].w = (m1->V[0].x * m2->V[0].w + m1->V[0].y * m2->V[1].w +
dst->V[0].w =
(m1->V[0].x * m2->V[0].w + m1->V[0].y * m2->V[1].w +
m1->V[0].z * m2->V[2].w + m1->V[0].w * m2->V[3].w);
dst->V[1].x = (m1->V[1].x * m2->V[0].x + m1->V[1].y * m2->V[1].x +
dst->V[1].x =
(m1->V[1].x * m2->V[0].x + m1->V[1].y * m2->V[1].x +
m1->V[1].z * m2->V[2].x + m1->V[1].w * m2->V[3].x);
dst->V[1].y = (m1->V[1].x * m2->V[0].y + m1->V[1].y * m2->V[1].y +
dst->V[1].y =
(m1->V[1].x * m2->V[0].y + m1->V[1].y * m2->V[1].y +
m1->V[1].z * m2->V[2].y + m1->V[1].w * m2->V[3].y);
dst->V[1].z = (m1->V[1].x * m2->V[0].z + m1->V[1].y * m2->V[1].z +
dst->V[1].z =
(m1->V[1].x * m2->V[0].z + m1->V[1].y * m2->V[1].z +
m1->V[1].z * m2->V[2].z + m1->V[1].w * m2->V[3].z);
dst->V[1].w = (m1->V[1].x * m2->V[0].w + m1->V[1].y * m2->V[1].w +
dst->V[1].w =
(m1->V[1].x * m2->V[0].w + m1->V[1].y * m2->V[1].w +
m1->V[1].z * m2->V[2].w + m1->V[1].w * m2->V[3].w);
dst->V[2].x = (m1->V[2].x * m2->V[0].x + m1->V[2].y * m2->V[1].x +
dst->V[2].x =
(m1->V[2].x * m2->V[0].x + m1->V[2].y * m2->V[1].x +
m1->V[2].z * m2->V[2].x + m1->V[2].w * m2->V[3].x);
dst->V[2].y = (m1->V[2].x * m2->V[0].y + m1->V[2].y * m2->V[1].y +
dst->V[2].y =
(m1->V[2].x * m2->V[0].y + m1->V[2].y * m2->V[1].y +
m1->V[2].z * m2->V[2].y + m1->V[2].w * m2->V[3].y);
dst->V[2].z = (m1->V[2].x * m2->V[0].z + m1->V[2].y * m2->V[1].z +
dst->V[2].z =
(m1->V[2].x * m2->V[0].z + m1->V[2].y * m2->V[1].z +
m1->V[2].z * m2->V[2].z + m1->V[2].w * m2->V[3].z);
dst->V[2].w = (m1->V[2].x * m2->V[0].w + m1->V[2].y * m2->V[1].w +
dst->V[2].w =
(m1->V[2].x * m2->V[0].w + m1->V[2].y * m2->V[1].w +
m1->V[2].z * m2->V[2].w + m1->V[2].w * m2->V[3].w);
dst->V[3].x = (m1->V[3].x * m2->V[0].x + m1->V[3].y * m2->V[1].x +
dst->V[3].x =
(m1->V[3].x * m2->V[0].x + m1->V[3].y * m2->V[1].x +
m1->V[3].z * m2->V[2].x + m1->V[3].w * m2->V[3].x);
dst->V[3].y = (m1->V[3].x * m2->V[0].y + m1->V[3].y * m2->V[1].y +
dst->V[3].y =
(m1->V[3].x * m2->V[0].y + m1->V[3].y * m2->V[1].y +
m1->V[3].z * m2->V[2].y + m1->V[3].w * m2->V[3].y);
dst->V[3].z = (m1->V[3].x * m2->V[0].z + m1->V[3].y * m2->V[1].z +
dst->V[3].z =
(m1->V[3].x * m2->V[0].z + m1->V[3].y * m2->V[1].z +
m1->V[3].z * m2->V[2].z + m1->V[3].w * m2->V[3].z);
dst->V[3].w = (m1->V[3].x * m2->V[0].w + m1->V[3].y * m2->V[1].w +
dst->V[3].w =
(m1->V[3].x * m2->V[0].w + m1->V[3].y * m2->V[1].w +
m1->V[3].z * m2->V[2].w + m1->V[3].w * m2->V[3].w);
}
@ -423,10 +436,14 @@ void matrix44_transform(matrix44 *matrix, vector4 *dst)
origin.y = dst->y;
origin.z = dst->z;
origin.w = dst->w;
dst->x = origin.x * matrix->V[0].x + origin.y * matrix->V[1].x + origin.z * matrix->V[2].x + origin.w * matrix->V[3].x;
dst->y = origin.x * matrix->V[0].y + origin.y * matrix->V[1].y + origin.z * matrix->V[2].y + origin.w * matrix->V[3].y;
dst->z = origin.x * matrix->V[0].z + origin.y * matrix->V[1].z + origin.z * matrix->V[2].z + origin.w * matrix->V[3].z;
dst->w = origin.x * matrix->V[0].w + origin.y * matrix->V[1].w + origin.z * matrix->V[2].w + origin.w * matrix->V[3].w;
dst->x = origin.x * matrix->V[0].x + origin.y * matrix->V[1].x +
origin.z * matrix->V[2].x + origin.w * matrix->V[3].x;
dst->y = origin.x * matrix->V[0].y + origin.y * matrix->V[1].y +
origin.z * matrix->V[2].y + origin.w * matrix->V[3].y;
dst->z = origin.x * matrix->V[0].z + origin.y * matrix->V[1].z +
origin.z * matrix->V[2].z + origin.w * matrix->V[3].z;
dst->w = origin.x * matrix->V[0].w + origin.y * matrix->V[1].w +
origin.z * matrix->V[2].w + origin.w * matrix->V[3].w;
}
/*******************************************************************************/
@ -435,24 +452,35 @@ void matrix44_transform(matrix44 *matrix, vector4 *dst)
float matrix44_determinant(matrix44 * matrix)
{
float a, b, c, d;
a = matrix->V[0].x * todeterminant(matrix->V[1].y, matrix->V[2].y, matrix->V[3].y,
matrix->V[1].z, matrix->V[2].z, matrix->V[3].z,
matrix->V[1].w, matrix->V[2].w, matrix->V[3].w);
b = matrix->V[0].y * todeterminant(matrix->V[1].x, matrix->V[2].x, matrix->V[3].x,
matrix->V[1].z, matrix->V[2].z, matrix->V[3].z,
matrix->V[1].w, matrix->V[2].w, matrix->V[3].w);
c = matrix->V[0].z * todeterminant(matrix->V[1].x, matrix->V[2].x, matrix->V[3].x,
matrix->V[1].y, matrix->V[2].y, matrix->V[3].y,
matrix->V[1].w, matrix->V[2].w, matrix->V[3].w);
d = matrix->V[0].w * todeterminant(matrix->V[1].x, matrix->V[2].x, matrix->V[3].x,
matrix->V[1].y, matrix->V[2].y, matrix->V[3].y,
matrix->V[1].z, matrix->V[2].z, matrix->V[3].z);
a = matrix->V[0].x * todeterminant(matrix->V[1].y, matrix->V[2].y,
matrix->V[3].y, matrix->V[1].z,
matrix->V[2].z, matrix->V[3].z,
matrix->V[1].w, matrix->V[2].w,
matrix->V[3].w);
b = matrix->V[0].y * todeterminant(matrix->V[1].x, matrix->V[2].x,
matrix->V[3].x, matrix->V[1].z,
matrix->V[2].z, matrix->V[3].z,
matrix->V[1].w, matrix->V[2].w,
matrix->V[3].w);
c = matrix->V[0].z * todeterminant(matrix->V[1].x, matrix->V[2].x,
matrix->V[3].x, matrix->V[1].y,
matrix->V[2].y, matrix->V[3].y,
matrix->V[1].w, matrix->V[2].w,
matrix->V[3].w);
d = matrix->V[0].w * todeterminant(matrix->V[1].x, matrix->V[2].x,
matrix->V[3].x, matrix->V[1].y,
matrix->V[2].y, matrix->V[3].y,
matrix->V[1].z, matrix->V[2].z,
matrix->V[3].z);
return a - b + c - d;
}
float todeterminant(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3)
float todeterminant(float a1, float a2, float a3, float b1, float b2,
float b3, float c1, float c2, float c3)
{
return (a1 * ((b2 * c3) - (b3 * c2))) - (b1 * ((a2 * c3) - (a3 * c2))) + (c1 * ((a2 * b3) - (a3 * b2)));
return (a1 * ((b2 * c3) - (b3 * c2))) -
(b1 * ((a2 * c3) - (a3 * c2))) +
(c1 * ((a2 * b3) - (a3 * b2)));
}
/*******************************************************************************/
@ -460,7 +488,8 @@ float todeterminant(float a1, float a2, float a3, float b1, float b2, float b3,
void matrix44_adjoint(matrix44 * matrix)
{
float a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d1, d2, d3, d4;
float a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d1, d2, d3,
d4;
a1 = matrix->V[0].x;
b1 = matrix->V[0].y;
c1 = matrix->V[0].z;
@ -482,23 +511,31 @@ void matrix44_adjoint(matrix44 *matrix)
d4 = matrix->V[3].w;
matrix->V[0].x = todeterminant(b2, b3, b4, c2, c3, c4, d2, d3, d4);
matrix->V[1].x = -todeterminant(a2, a3, a4, c2, c3, c4, d2, d3, d4);
matrix->V[1].x =
-todeterminant(a2, a3, a4, c2, c3, c4, d2, d3, d4);
matrix->V[2].x = todeterminant(a2, a3, a4, b2, b3, b4, d2, d3, d4);
matrix->V[3].x = -todeterminant(a2, a3, a4, b2, b3, b4, c2, c3, c4);
matrix->V[3].x =
-todeterminant(a2, a3, a4, b2, b3, b4, c2, c3, c4);
matrix->V[0].y = -todeterminant(b1, b3, b4, c1, c3, c4, d1, d3, d4);
matrix->V[0].y =
-todeterminant(b1, b3, b4, c1, c3, c4, d1, d3, d4);
matrix->V[1].y = todeterminant(a1, a3, a4, c1, c3, c4, d1, d3, d4);
matrix->V[2].y = -todeterminant(a1, a3, a4, b1, b3, b4, d1, d3, d4);
matrix->V[2].y =
-todeterminant(a1, a3, a4, b1, b3, b4, d1, d3, d4);
matrix->V[3].y = todeterminant(a1, a3, a4, b1, b3, b4, c1, c3, c4);
matrix->V[0].z = todeterminant(b1, b2, b4, c1, c2, c4, d1, d2, d4);
matrix->V[1].z = -todeterminant(a1, a2, a4, c1, c2, c4, d1, d2, d4);
matrix->V[1].z =
-todeterminant(a1, a2, a4, c1, c2, c4, d1, d2, d4);
matrix->V[2].z = todeterminant(a1, a2, a4, b1, b2, b4, d1, d2, d4);
matrix->V[3].z = -todeterminant(a1, a2, a4, b1, b2, b4, c1, c2, c4);
matrix->V[3].z =
-todeterminant(a1, a2, a4, b1, b2, b4, c1, c2, c4);
matrix->V[0].w = -todeterminant(b1, b2, b3, c1, c2, c3, d1, d2, d3);
matrix->V[0].w =
-todeterminant(b1, b2, b3, c1, c2, c3, d1, d2, d3);
matrix->V[1].w = todeterminant(a1, a2, a3, c1, c2, c3, d1, d2, d3);
matrix->V[2].w = -todeterminant(a1, a2, a3, b1, b2, b3, d1, d2, d3);
matrix->V[2].w =
-todeterminant(a1, a2, a3, b1, b2, b3, d1, d2, d3);
matrix->V[3].w = todeterminant(a1, a2, a3, b1, b2, b3, c1, c2, c3);
}
@ -507,9 +544,12 @@ void matrix44_adjoint(matrix44 *matrix)
void matrix44_show(matrix44 * matrix)
{
printf("Matrice: X=%f Y=%f Z=%f W=%f \r\n", matrix->V[0].x, matrix->V[1].y, matrix->V[2].z, matrix->V[3].w);
printf(" X=%f Y=%f Z=%f W=%f \r\n", matrix->V[0].x, matrix->V[1].y, matrix->V[2].z, matrix->V[3].w);
printf(" X=%f Y=%f Z=%f W=%f \r\n", matrix->V[0].x, matrix->V[1].y, matrix->V[2].z, matrix->V[3].w);
printf("Matrice: X=%f Y=%f Z=%f W=%f \r\n", matrix->V[0].x,
matrix->V[1].y, matrix->V[2].z, matrix->V[3].w);
printf(" X=%f Y=%f Z=%f W=%f \r\n", matrix->V[0].x,
matrix->V[1].y, matrix->V[2].z, matrix->V[3].w);
printf(" X=%f Y=%f Z=%f W=%f \r\n", matrix->V[0].x,
matrix->V[1].y, matrix->V[2].z, matrix->V[3].w);
}
/*******************************************************************************/
@ -564,7 +604,8 @@ void matrix44_transpose(matrix44 *matrix)
/*******************************************************************************/
/* Crée une matrice de camera */
void matrix44_lookat(vector4 eye, vector4 dst, vector4 up, matrix44 *matrix)
void matrix44_lookat(vector4 eye, vector4 dst, vector4 up,
matrix44 * matrix)
{
vector4 xaxis, yaxis, zaxis, negeye;
vector4_sub(dst, eye, &zaxis);
@ -597,8 +638,10 @@ void matrix44_lookat(vector4 eye, vector4 dst, vector4 up, matrix44 *matrix)
int matrix44_isequals(matrix44 * m1, matrix44 * m2)
{
return vector4_isequals(m1->V[0], m2->V[0]) && vector4_isequals(m1->V[1], m2->V[1]) &&
vector4_isequals(m1->V[2], m2->V[2]) && vector4_isequals(m1->V[3], m2->V[3]);
return vector4_isequals(m1->V[0], m2->V[0])
&& vector4_isequals(m1->V[1], m2->V[1])
&& vector4_isequals(m1->V[2], m2->V[2])
&& vector4_isequals(m1->V[3], m2->V[3]);
}
/*******************************************************************************/

View File

@ -48,7 +48,8 @@ u32 getmallocnb(void)
u32 realsize = 0;
tmalloc *chunk;
chunk = KERNEL_HEAP;
while (chunk < (tmalloc *) kernelcurrentheap) {
while (chunk < (tmalloc *) kernelcurrentheap)
{
realsize++;
chunk = (tmalloc *) ((u8 *) chunk + chunk->size);
}
@ -64,7 +65,8 @@ u32 getmallocused(void)
u32 realsize = 0;
tmalloc *chunk;
chunk = KERNEL_HEAP;
while (chunk < (tmalloc *) kernelcurrentheap) {
while (chunk < (tmalloc *) kernelcurrentheap)
{
if (chunk->used)
realsize += chunk->size;
chunk = (tmalloc *) ((u8 *) chunk + chunk->size);
@ -80,7 +82,8 @@ u32 getmallocfree(void)
u32 realsize = 0;
tmalloc *chunk;
chunk = KERNEL_HEAP;
while (chunk < (tmalloc *) kernelcurrentheap) {
while (chunk < (tmalloc *) kernelcurrentheap)
{
if (!chunk->used)
realsize += chunk->size;
chunk = (tmalloc *) ((u8 *) chunk + chunk->size);
@ -107,18 +110,24 @@ void *vmalloc(u32 size)
if (realsize < MALLOC_MINIMUM)
realsize = MALLOC_MINIMUM;
chunk = KERNEL_HEAP;
while (chunk->used || chunk->size < realsize) {
while (chunk->used || chunk->size < realsize)
{
if (chunk->size == 0)
panic(sprintf("Element du heap %x defectueux avec une taille nulle (heap %x) !",chunk, kernelcurrentheap));
panic(sprintf
("Element du heap %x defectueux avec une taille nulle (heap %x) !",
chunk, kernelcurrentheap));
chunk = (tmalloc *) ((u8 *) chunk + chunk->size);
if (chunk == (tmalloc *) kernelcurrentheap)
mallocpage(realsize);
else if (chunk > (tmalloc *) kernelcurrentheap)
panic (sprintf("Element du heap %x depassant la limite %x !",chunk, kernelcurrentheap));
panic(sprintf
("Element du heap %x depassant la limite %x !",
chunk, kernelcurrentheap));
}
if (chunk->size - realsize < MALLOC_MINIMUM)
chunk->used = 1;
else {
else
{
new = (tmalloc *) ((u8 *) chunk + realsize);
new->size = chunk->size - realsize;
new->used = 0;
@ -136,7 +145,8 @@ void vfree(void *vaddr)
tmalloc *chunk, *new;
chunk = (tmalloc *) (vaddr - sizeof(tmalloc));
chunk->used = 0;
while ((new = (tmalloc *)((u8 *) chunk + chunk->size)) && new < (tmalloc *) kernelcurrentheap && new->used == 0)
while ((new = (tmalloc *) ((u8 *) chunk + chunk->size))
&& new < (tmalloc *) kernelcurrentheap && new->used == 0)
chunk->size += new->size;
}
@ -148,8 +158,12 @@ u64 physical_getmemorysize()
u64 maxaddr = 0;
struct multiboot_tag_mmap *tag = getgrubinfo_mem();
multiboot_memory_map_t *mmap;
for (mmap = ((struct multiboot_tag_mmap *) tag)->entries;(u8 *) mmap < (u8 *) tag + tag->size; mmap = (multiboot_memory_map_t *)
((unsigned long) mmap + ((struct multiboot_tag_mmap *) tag)->entry_size))
for (mmap = ((struct multiboot_tag_mmap *) tag)->entries;
(u8 *) mmap < (u8 *) tag + tag->size;
mmap =
(multiboot_memory_map_t *) ((unsigned long) mmap +
((struct multiboot_tag_mmap *)
tag)->entry_size))
if ((mmap->addr + mmap->len > maxaddr) && mmap->type == 1)
maxaddr = mmap->addr + mmap->len;
if (maxaddr >= MAXMEMSIZE)
@ -180,7 +194,7 @@ void physical_range_use(u64 addr,u64 len)
{
u32 nbpage = TOPAGE(len);
u32 pagesrc = TOPAGE(addr);
if (len & 0b1111111111 > 0)
if (len & 0x3FF > 0)
nbpage++;
if (addr >= MAXMEMSIZE)
return;
@ -197,7 +211,7 @@ void physical_range_free(u64 addr,u64 len)
{
u32 nbpage = TOPAGE(len);
u32 pagesrc = TOPAGE(addr);
if (len & 0b1111111111 > 0)
if (len & 0x3FF > 0)
nbpage++;
if (addr >= MAXMEMSIZE)
return;
@ -218,7 +232,8 @@ u8* physical_page_getfree(void)
for (byte = 0; byte < sizeof(bitmap); byte++)
if (bitmap[byte] != 0xFF)
for (bit = 0; bit < 8; bit++)
if (!(bitmap[byte] & (1 << bit))) {
if (!(bitmap[byte] & (1 << bit)))
{
page = 8 * byte + bit;
physical_page_use(page);
return (u8 *) (page * PAGESIZE);
@ -251,8 +266,12 @@ void physical_init(void)
bitmap[page] = 0xFF;
struct multiboot_tag_mmap *tag = getgrubinfo_mem();
multiboot_memory_map_t *mmap;
for (mmap = ((struct multiboot_tag_mmap *) tag)->entries;(u8 *) mmap < (u8 *) tag + tag->size; mmap = (multiboot_memory_map_t *)
((unsigned long) mmap + ((struct multiboot_tag_mmap *) tag)->entry_size))
for (mmap = ((struct multiboot_tag_mmap *) tag)->entries;
(u8 *) mmap < (u8 *) tag + tag->size;
mmap =
(multiboot_memory_map_t *) ((unsigned long) mmap +
((struct multiboot_tag_mmap *)
tag)->entry_size))
if (mmap->type == 1)
physical_range_free(mmap->addr, mmap->len);
else
@ -276,7 +295,8 @@ page *virtual_page_getfree(void)
vpages = TAILQ_FIRST(&vrange_head);
vaddr = vpages->vaddrlow;
vpages->vaddrlow += PAGESIZE;
if (vpages->vaddrlow == vpages->vaddrhigh) {
if (vpages->vaddrlow == vpages->vaddrhigh)
{
TAILQ_REMOVE(&vrange_head, vpages, tailq);
vfree(vpages);
}
@ -303,7 +323,8 @@ pd *virtual_pd_create()
pdir[i] = pd0[i];
for (i = 256; i < 1023; i++)
pdir[i] = 0;
pdir[1023] = ((u32) new->addr->paddr | (PAGE_PRESENT | PAGE_WRITE));
pdir[1023] =
((u32) new->addr->paddr | (PAGE_PRESENT | PAGE_WRITE));
TAILQ_INIT(&new->page_head);
return new;
}
@ -319,19 +340,24 @@ void virtual_pd_page_add(pd *dst, u8* vaddr, u8 * paddr, u32 flags)
page *pg;
int i;
if (dst == NULL)
if (vaddr > (u8 *) USER_CODE) {
if (vaddr > (u8 *) USER_CODE)
{
print("ERREUR: Adresse %X n'est pas dans l'espace noyau !\n", vaddr);
return;
}
pdir = (u32 *) (0xFFFFF000 | (((u32) vaddr & 0xFFC00000) >> 20));
if ((*pdir & PAGE_PRESENT) == 0) {
if ((*pdir & PAGE_PRESENT) == 0)
{
if (dst == NULL)
panic(sprintf("Page table introuvable pour l'adresse %x !\r\n", vaddr));
panic(sprintf
("Page table introuvable pour l'adresse %x !\r\n",
vaddr));
pg = virtual_page_getfree();
pt = (u32 *) pg->vaddr;
for (i = 1; i < 1024; i++)
pt[i] = 0;
*pdir = (u32) pg->paddr | (PAGE_PRESENT | PAGE_WRITE | flags);
*pdir = (u32) pg->
paddr | (PAGE_PRESENT | PAGE_WRITE | flags);
if (dst)
TAILQ_INSERT_TAIL(&dst->page_head, pg, tailq);
}
@ -346,8 +372,10 @@ void virtual_pd_page_add(pd *dst, u8* vaddr, u8 * paddr, u32 flags)
void virtual_pd_page_remove(u8 * vaddr)
{
u32 *ptable;
if (virtual_to_physical(vaddr)) {
ptable = (u32 *) (0xFFC00000 | (((u32) vaddr & 0xFFFFF000) >> 10));
if (virtual_to_physical(vaddr))
{
ptable = (u32 *) (0xFFC00000 |
(((u32) vaddr & 0xFFFFF000) >> 10));
*ptable = (*ptable & (~PAGE_PRESENT));
asm("invlpg %0"::"m"(vaddr));
}
@ -363,10 +391,13 @@ u8* virtual_to_physical(u8 *vaddr)
u32 *ptable;
pdir = (u32 *) (0xFFFFF000 | (((u32) vaddr & 0xFFC00000) >> 20));
if ((*pdir & PAGE_PRESENT)) {
ptable = (u32 *) (0xFFC00000 | (((u32) vaddr & 0xFFFFF000) >> 10));
if ((*pdir & PAGE_PRESENT))
{
ptable = (u32 *) (0xFFC00000 |
(((u32) vaddr & 0xFFFFF000) >> 10));
if ((*ptable & PAGE_PRESENT))
return (u8 *) ((*ptable & 0xFFFFF000) + (TOPG((u32) vaddr)));
return (u8 *) ((*ptable & 0xFFFFF000) +
(TOPG((u32) vaddr)));
}
return 0;
}
@ -374,17 +405,20 @@ u8* virtual_to_physical(u8 *vaddr)
/*******************************************************************************/
/* Détermine une plage virtuelle de mémoire comme étant mappé aux adresses physiques spécifiées GENERIQUE*/
void virtual_range_use(pd *dst, u8 *vaddr, u8 *paddr, u64 len, u32 flags)
void virtual_range_use(pd * dst, u8 * vaddr, u8 * paddr, u64 len,
u32 flags)
{
u64 i;
u32 realen = len / PAGESIZE;
page *pg;
if (len%PAGESIZE!=0) realen++;
if (len % PAGESIZE != 0)
realen++;
for (i = 0; i < realen; i++)
{
if (dst == NULL)
{
virtual_pd_page_add(dst, vaddr+i*PAGESIZE, paddr+i*PAGESIZE, flags);
virtual_pd_page_add(dst, vaddr + i * PAGESIZE,
paddr + i * PAGESIZE, flags);
}
else
{
@ -392,7 +426,8 @@ void virtual_range_use(pd *dst, u8 *vaddr, u8 *paddr, u64 len, u32 flags)
pg->paddr = paddr + i * PAGESIZE;
pg->vaddr = vaddr + i * PAGESIZE;
TAILQ_INSERT_TAIL(&dst->page_head, pg, tailq);
virtual_pd_page_add(dst, pg->vaddr, pg->paddr, flags);
virtual_pd_page_add(dst, pg->vaddr, pg->paddr,
flags);
}
}
}
@ -404,7 +439,8 @@ void virtual_range_free(pd *dst, u8 *vaddr, u64 len)
{
u64 i;
u32 realen = len / PAGESIZE;
if (len%PAGESIZE!=0) realen++;
if (len % PAGESIZE != 0)
realen++;
for (i = 0; i < realen; i++)
{
virtual_pd_page_remove(vaddr + i * PAGESIZE);
@ -420,12 +456,15 @@ void virtual_range_new(pd *dst, u8 *vaddr, u64 len, u32 flags)
u64 i;
u32 realen = len / PAGESIZE;
page *pg;
if (len%PAGESIZE!=0) realen++;
if (len % PAGESIZE != 0)
realen++;
for (i = 0; i < realen; i++)
{
if (dst == NULL)
{
virtual_pd_page_add(dst, vaddr+i*PAGESIZE, physical_page_getfree(), flags);
virtual_pd_page_add(dst, vaddr + i * PAGESIZE,
physical_page_getfree(),
flags);
}
else
{
@ -433,7 +472,8 @@ void virtual_range_new(pd *dst, u8 *vaddr, u64 len, u32 flags)
pg->paddr = physical_page_getfree();
pg->vaddr = vaddr + i * PAGESIZE;
TAILQ_INSERT_TAIL(&dst->page_head, pg, tailq);
virtual_pd_page_add(dst, pg->vaddr, pg->paddr, flags);
virtual_pd_page_add(dst, pg->vaddr, pg->paddr,
flags);
}
}
}
@ -478,8 +518,8 @@ u32 virtual_getpagesfree()
{
vrange *next;
u32 realsize = 0;
TAILQ_FOREACH(next, &vrange_head, tailq)
realsize+=(next->vaddrhigh - next->vaddrlow)/PAGESIZE;
TAILQ_FOREACH(next, &vrange_head, tailq) realsize +=
(next->vaddrhigh - next->vaddrlow) / PAGESIZE;
return realsize;
}
@ -494,28 +534,35 @@ void virtual_page_free(u8 *vaddr)
paddr = virtual_to_physical(vaddr);
if (paddr)
physical_page_free(TOPAGE((u32) paddr));
else {
printf("Aucune page associee a l'adresse virtuelle %x\n", vaddr);
else
{
printf("Aucune page associee a l'adresse virtuelle %x\n",
vaddr);
return;
}
virtual_pd_page_remove(vaddr);
TAILQ_FOREACH(next, &vrange_head, tailq) {
TAILQ_FOREACH(next, &vrange_head, tailq)
{
if (next->vaddrlow > vaddr)
break;
}
prev = TAILQ_PREV(next, vrange_s, tailq);
if (prev->vaddrhigh == vaddr) {
if (prev->vaddrhigh == vaddr)
{
prev->vaddrhigh += PAGESIZE;
if (prev->vaddrhigh == next->vaddrlow) {
if (prev->vaddrhigh == next->vaddrlow)
{
prev->vaddrhigh = next->vaddrhigh;
TAILQ_REMOVE(&vrange_head, next, tailq);
vfree(next);
}
}
else if (next->vaddrlow == vaddr + PAGESIZE) {
else if (next->vaddrlow == vaddr + PAGESIZE)
{
next->vaddrlow = vaddr;
}
else if (next->vaddrlow > vaddr + PAGESIZE) {
else if (next->vaddrlow > vaddr + PAGESIZE)
{
new = (vrange *) vmalloc(sizeof(vrange));
new->vaddrlow = vaddr;
new->vaddrhigh = vaddr + PAGESIZE;
@ -532,7 +579,8 @@ void virtual_page_free(u8 *vaddr)
void virtual_pd_destroy(pd * dst)
{
page *pg;
TAILQ_FOREACH(pg, &dst->page_head, tailq) {
TAILQ_FOREACH(pg, &dst->page_head, tailq)
{
virtual_page_free(pg->vaddr);
TAILQ_REMOVE(&dst->page_head, pg, tailq);
vfree(pg);
@ -549,7 +597,8 @@ void malloc_init(void)
{
tmalloc *chunk;
chunk = (tmalloc *) KERNEL_HEAP;
virtual_pd_page_add(NULL, KERNEL_HEAP, physical_page_getfree(), PAGE_NOFLAG);
virtual_pd_page_add(NULL, KERNEL_HEAP, physical_page_getfree(),
PAGE_NOFLAG);
kernelcurrentheap = KERNEL_HEAP + PAGESIZE;
chunk->size = PAGESIZE;
chunk->used = 0;
@ -581,8 +630,8 @@ void identity_init(void)
pd0[0] = ((u32) pg0 | (PAGE_PRESENT | PAGE_WRITE | PAGE_4MB));
pd0[1] = ((u32) pg1 | (PAGE_PRESENT | PAGE_WRITE | PAGE_4MB));
for (i = 2; i < 1023; i++)
pd0[i] =
((u32) pg1 + PAGESIZE * i) | (PAGE_PRESENT | PAGE_WRITE);
pd0[i] = ((u32) pg1 +
PAGESIZE * i) | (PAGE_PRESENT | PAGE_WRITE);
pd0[1023] = ((u32) pd0 | (PAGE_PRESENT | PAGE_WRITE));
}
@ -619,8 +668,10 @@ void initpaging(void)
void memset(void *dst, u8 val, u32 count, u32 size)
{
u8 *d = (u8 *) dst;
if (size>0) size--;
for (; count != 0; count--) {
if (size > 0)
size--;
for (; count != 0; count--)
{
*(d++) = val;
d += size;
}
@ -633,8 +684,10 @@ void memcpy(void *src, void *dst, u32 count, u32 size)
{
u8 *s = (u8 *) src;
u8 *d = (u8 *) dst;
if (size>0) size--;
for (; count != 0; count--) {
if (size > 0)
size--;
for (; count != 0; count--)
{
*(d++) = *(s++);
d += size;
}
@ -647,8 +700,10 @@ u32 memcmp(void *src, void *dst, u32 count, u32 size)
{
u8 *s = (u8 *) src;
u8 *d = (u8 *) dst;
if (size>0) size--;
for (; count != 0; count--) {
if (size > 0)
size--;
for (; count != 0; count--)
{
if (*(s++) != *(d++))
return *d - *s;
s += size;

View File

@ -72,8 +72,10 @@ void mouse(void)
u8 mbyte = inb(0x60);
s8 changex, changey;
if (mousereplies > 0) {
if (mbyte == 0xFA) {
if (mousereplies > 0)
{
if (mbyte == 0xFA)
{
mousereplies--;
goto endofint;
}
@ -83,34 +85,47 @@ void mouse(void)
mpacket[bytepos] = mbyte;
bytepos++;
if (bytepos == 3) {
if (bytepos == 3)
{
bytepos = 0;
if (mpacket[1] == 0) {
if (mpacket[1] == 0)
{
changex = 0;
} else {
changex = (mpacket[0] & 0x10) ?
mpacket[1] - 256 : mpacket[1];
}
if (mpacket[2] == 0) {
else
{
changex =
(mpacket[0] & 0x10) ? mpacket[1] -
256 : mpacket[1];
}
if (mpacket[2] == 0)
{
changey = 0;
} else {
changey = -((mpacket[0] & 0x20) ?
mpacket[2] - 256 : mpacket[2]);
}
else
{
changey =
-((mpacket[0] & 0x20) ? mpacket[2] -
256 : mpacket[2]);
}
mousex += (changex << speed);
mousey += (changey << speed);
if (mousex < 0) {
if (mousex < 0)
{
mousex = 0;
}
if (mousex >= 65535) {
if (mousex >= 65535)
{
mousex = 65535;
}
if (mousey < 0) {
if (mousey < 0)
{
mousey = 0;
}
if (mousey >= 65535) {
if (mousey >= 65535)
{
mousey = 65535;
}
videoinfos *info = getvideo_info();

View File

@ -23,8 +23,11 @@ struct multiboot_tag *tag;
unsigned size = *(unsigned *) infobloc;
for (tag = (struct multiboot_tag *) (infobloc + 8);
tag->type != MULTIBOOT_TAG_TYPE_END;
tag = (struct multiboot_tag *) ((u8 *) tag + ((tag->size + 7) & ~7)))
if (tag->type==type) return tag;
tag =
(struct multiboot_tag *) ((u8 *) tag +
((tag->size + 7) & ~7)))
if (tag->type == type)
return tag;
}
/*******************************************************************************/
@ -32,7 +35,8 @@ for (tag = (struct multiboot_tag *) (infobloc + 8);
u8 *getgrubinfo_cmdline(void)
{
struct multiboot_tag_string *tag=getgrubinfo(MULTIBOOT_TAG_TYPE_CMDLINE);
struct multiboot_tag_string *tag =
getgrubinfo(MULTIBOOT_TAG_TYPE_CMDLINE);
return tag->string;
}
@ -41,7 +45,8 @@ u8 *getgrubinfo_cmdline(void)
u32 getgrubinfo_ram(void)
{
struct multiboot_tag_basic_meminfo *tag=getgrubinfo(MULTIBOOT_TAG_TYPE_BASIC_MEMINFO);
struct multiboot_tag_basic_meminfo *tag =
getgrubinfo(MULTIBOOT_TAG_TYPE_BASIC_MEMINFO);
return tag->mem_upper;
}
@ -50,7 +55,8 @@ u32 getgrubinfo_ram(void)
struct multiboot_tag_mmap *getgrubinfo_mem(void)
{
struct multiboot_tag_mmap *tag=getgrubinfo(MULTIBOOT_TAG_TYPE_MMAP);
struct multiboot_tag_mmap *tag =
getgrubinfo(MULTIBOOT_TAG_TYPE_MMAP);
return tag;
}
@ -59,7 +65,8 @@ struct multiboot_tag_mmap *getgrubinfo_mem(void)
struct multiboot_tag_framebuffer *getgrubinfo_fb(void)
{
struct multiboot_tag_framebuffer *tag=getgrubinfo(MULTIBOOT_TAG_TYPE_FRAMEBUFFER);
struct multiboot_tag_framebuffer *tag =
getgrubinfo(MULTIBOOT_TAG_TYPE_FRAMEBUFFER);
return tag;
}
@ -70,55 +77,59 @@ void getgrubinfo_all(void)
{
struct multiboot_tag *tag;
u32 size = *(unsigned *) infobloc;
if (infobloc & 7) print("Attention : Bloc non aligne...");
if (infobloc & 7)
print("Attention : Bloc non aligne...");
printf(" Taille :% 4u\r\n", (u32) size);
for (tag = (struct multiboot_tag *) (infobloc + 8);
tag->type != MULTIBOOT_TAG_TYPE_END;
tag = (struct multiboot_tag *) ((u8 *) tag + ((tag->size + 7) & ~7)))
tag =
(struct multiboot_tag *) ((u8 *) tag +
((tag->size + 7) & ~7)))
{
printf ("--- Tag % hu, Taille % hu\r\n", tag->type, tag->size);
printf("--- Tag % hu, Taille % hu\r\n", tag->type,
tag->size);
switch (tag->type)
{
case MULTIBOOT_TAG_TYPE_CMDLINE:
printf(" Ligne de lancement : %s\r\n",
((struct multiboot_tag_string *) tag)->string);
((struct multiboot_tag_string *)
tag)->string);
break;
case MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME:
printf(" Chargeur de boot : %s\r\n",
((struct multiboot_tag_string *) tag)->string);
((struct multiboot_tag_string *)
tag)->string);
break;
case MULTIBOOT_TAG_TYPE_MODULE:
printf (" Module %X-%X. Command line %s\r\n",
((struct multiboot_tag_module *) tag)->mod_start,
((struct multiboot_tag_module *) tag)->mod_end,
((struct multiboot_tag_module *) tag)->cmdline);
printf(" Module %X-%X. Command line %s\r\n", ((struct multiboot_tag_module *) tag)->mod_start, ((struct multiboot_tag_module *) tag)->mod_end, ((struct multiboot_tag_module *) tag)->cmdline);
break;
case MULTIBOOT_TAG_TYPE_BASIC_MEMINFO:
printf (" Memoire basse : %H, memoire haute = %lH\r\n",
((struct multiboot_tag_basic_meminfo *) tag)->mem_lower<<10,
((u64)((struct multiboot_tag_basic_meminfo *) tag)->mem_upper)<<10);
printf(" Memoire basse : %H, memoire haute = %lH\r\n", ((struct multiboot_tag_basic_meminfo *) tag)->mem_lower << 10, ((u64) ((struct multiboot_tag_basic_meminfo *) tag)->mem_upper) << 10);
break;
case MULTIBOOT_TAG_TYPE_BOOTDEV:
printf (" Peripherique de demarrage : %Y,%u,%u\r\n\r\n",
((struct multiboot_tag_bootdev *) tag)->biosdev,
((struct multiboot_tag_bootdev *) tag)->slice,
((struct multiboot_tag_bootdev *) tag)->part);
printf(" Peripherique de demarrage : %Y,%u,%u\r\n\r\n", ((struct multiboot_tag_bootdev *) tag)->biosdev, ((struct multiboot_tag_bootdev *) tag)->slice, ((struct multiboot_tag_bootdev *) tag)->part);
break;
case MULTIBOOT_TAG_TYPE_MMAP:
{
multiboot_memory_map_t *mmap;
printf("*** Plan de memoire ***\r\n");
for (mmap = ((struct multiboot_tag_mmap *) tag)->entries;(u8 *) mmap < (u8 *) tag + tag->size; mmap = (multiboot_memory_map_t *)
((unsigned long) mmap + ((struct multiboot_tag_mmap *) tag)->entry_size))
printf (" adresse: %lY, taille:%lY, type:%Y\r\n",
(u64) (mmap->addr),
(u64) (mmap->len),
(u32) (mmap->type));
for (mmap =
((struct multiboot_tag_mmap *) tag)->
entries;
(u8 *) mmap < (u8 *) tag + tag->size;
mmap =
(multiboot_memory_map_t
*) ((unsigned long) mmap +
((struct multiboot_tag_mmap *)
tag)->entry_size))
printf(" adresse: %lY, taille:%lY, type:%Y\r\n", (u64) (mmap->addr), (u64) (mmap->len), (u32) (mmap->type));
break;
}
case MULTIBOOT_TAG_TYPE_FRAMEBUFFER:
{
struct multiboot_tag_framebuffer *tagfb = (struct multiboot_tag_framebuffer *) tag;
struct multiboot_tag_framebuffer *tagfb =
(struct multiboot_tag_framebuffer
*) tag;
printf(" Framebuffer, resolution %d*%d*%d adresse: %X, ", tagfb->common.framebuffer_width, tagfb->common.framebuffer_height, tagfb->common.framebuffer_bpp, tagfb->common.framebuffer_addr);
switch (tagfb->common.framebuffer_type)
{
@ -136,7 +147,9 @@ for (tag = (struct multiboot_tag *) (infobloc + 8);
}
case MULTIBOOT_TAG_TYPE_VBE:
{
struct multiboot_tag_vbe *tagvbe = (struct multiboot_tag_framebuffer *) tag;
struct multiboot_tag_vbe *tagvbe =
(struct multiboot_tag_framebuffer
*) tag;
printf(" VBE 2.0, mode %Y, adresse %hY:%hY-%hY\r\n", tagvbe->vbe_mode, tagvbe->vbe_interface_seg, tagvbe->vbe_interface_off, tagvbe->vbe_interface_len);
}
}

View File

@ -17,18 +17,23 @@
u8 *pcigetclassname(const pcidev * device)
{
pciclass *class = NULL;
if ( device == NULL ) {
if (device == NULL)
{
return NULL;
}
if ( device->base_class == 0xff ) {
if (device->base_class == 0xff)
{
return "Unassigned class";
}
class = classcodes[device->base_class];
if (!class) {
if (!class)
{
return "Unknowned class";
}
while (class->name != NULL) {
if (class->number == device->sub_class) {
while (class->name != NULL)
{
if (class->number == device->sub_class)
{
return class->name;
}
class++;
@ -43,8 +48,11 @@ u8 * pcigetclassname( const pcidev *device)
pcidevmini getPCImininfo(const u8 bus, const u8 dev, const u8 function)
{
pcidevmini result;
if ((result.vendor_id = pciConfigReadWord(bus,dev,function,0x0)) != 0xFFFF) {
result.device_id = pciConfigReadWord(bus,dev,function,0x2);
if ((result.vendor_id =
pciConfigReadWord(bus, dev, function, 0x0)) != 0xFFFF)
{
result.device_id =
pciConfigReadWord(bus, dev, function, 0x2);
}
return result;
}
@ -52,14 +60,19 @@ pcidevmini getPCImininfo(const u8 bus, const u8 dev, const u8 function)
/*******************************************************************************/
/* Récupère toutes les informations du periphérique PCI donnée */
bool getPCInfo(pcidev *device, const u8 bus, const u8 dev, const u8 function)
bool getPCInfo(pcidev * device, const u8 bus, const u8 dev,
const u8 function)
{
if ((device->vendor_id = pciConfigReadWord(bus,dev,function,0x0)) != 0xFFFF)
if ((device->vendor_id =
pciConfigReadWord(bus, dev, function, 0x0)) != 0xFFFF)
{
u16 temp;
device->device_id = pciConfigReadWord(bus,dev,function,0x2);
device->command = pciConfigReadWord(bus,dev,function,0x4);
device->status = pciConfigReadWord(bus,dev,function,0x6);
device->device_id =
pciConfigReadWord(bus, dev, function, 0x2);
device->command =
pciConfigReadWord(bus, dev, function, 0x4);
device->status =
pciConfigReadWord(bus, dev, function, 0x6);
temp = pciConfigReadWord(bus, dev, function, 0x8);
device->revision_id = temp & 0xFF;
device->interface = temp >> 8;
@ -81,10 +94,13 @@ bool getPCInfo(pcidev *device, const u8 bus, const u8 dev, const u8 function)
/*******************************************************************************/
/* Récupère les informations sur le periphérique PCI donnée */
u16 pciConfigReadWord(const u8 bus, const u8 dev, const u8 function, const u8 offset)
u16 pciConfigReadWord(const u8 bus, const u8 dev, const u8 function,
const u8 offset)
{
u16 tmp = 0;
u32 addr = (0x80000000|(bus << 16)|(dev << 11)|(function << 8)|(offset & 0xFC));
u32 addr =
(0x80000000 | (bus << 16) | (dev << 11) | (function << 8) |
(offset & 0xFC));
outd(0xCF8, addr);
tmp = (u16) ((ind(0xCFC) >> ((offset & 2) * 8)) & 0xffff);
return tmp;
@ -99,9 +115,11 @@ void scanPCImini(void)
pcidevmini result;
for (bus = 0; bus < MAX_BUS_SCAN; ++bus)
for (device = 0; device < MAX_DEVICE_SCAN; ++device)
for (function=0; function<MAX_FUNCTION_SCAN; ++function)
for (function = 0; function < MAX_FUNCTION_SCAN;
++function)
{
result = getPCImininfo(bus,device,function);
result = getPCImininfo(bus, device,
function);
if (result.vendor_id != 0xFFFF)
printf("Bus:%hx Dev:%hx Func:%hx %hx:%hx\r\n", bus, device, function, result.vendor_id, result.device_id);
}
@ -118,11 +136,12 @@ void scanPCI(void)
pcidev result;
for (bus = 0; bus < MAX_BUS_SCAN; ++bus)
for (device = 0; device < MAX_DEVICE_SCAN; ++device)
for (function=0; function<MAX_FUNCTION_SCAN; ++function)
if (getPCInfo(&result,bus,device,function))
for (function = 0; function < MAX_FUNCTION_SCAN;
++function)
if (getPCInfo
(&result, bus, device, function))
printf("Bus:%hx Dev:%hx Func:%hx %hx:%hx ->%s\r\n", bus, device, function, result.vendor_id, result.device_id, pcigetclassname(&result));
return;
}
/*******************************************************************************/

View File

@ -18,7 +18,9 @@ static u8 elf_errors3[]="ELF non LSB";
static u8 elf_errors4[] = "ELF mauvaise version";
static u8 elf_errors5[] = "ELF pour OS ne correspondant pas";
static u8 elf_errors6[] = "Mauvais type de machine";
static u8 *elf_errors[]={&elf_errors1,&elf_errors2,&elf_errors3,&elf_errors4,&elf_errors5,&elf_errors6};
static u8 *elf_errors[] =
{ &elf_errors1, &elf_errors2, &elf_errors3, &elf_errors4,
&elf_errors5, &elf_errors6 };
/*******************************************************************************/
/* Vérifie la signature ELF
@ -33,14 +35,17 @@ static u8 *elf_errors[]={&elf_errors1,&elf_errors2,&elf_errors3,&elf_errors4,&el
u32 elf_test(u8 * src)
{
elf32 *header = (elf32 *) src;
if (header->e_ident[EI_MAG0] == ELFMAG0 && header->e_ident[EI_MAG1] == ELFMAG1
&& header->e_ident[EI_MAG2] == ELFMAG2 && header->e_ident[EI_MAG3] == ELFMAG3)
if (header->e_ident[EI_MAG0] == ELFMAG0
&& header->e_ident[EI_MAG1] == ELFMAG1
&& header->e_ident[EI_MAG2] == ELFMAG2
&& header->e_ident[EI_MAG3] == ELFMAG3)
{
if (header->e_ident[EI_CLASS] != ELFCLASS32)
return 2;
if (header->e_ident[EI_DATA] != ELFDATA2LSB)
return 3;
if (header->e_ident[EI_VERSION]!=EV_CURRENT || header->e_version!=EV_CURRENT)
if (header->e_ident[EI_VERSION] != EV_CURRENT
|| header->e_version != EV_CURRENT)
return 4;
if (header->e_ident[EI_OSABI] != ELFOSABI_COS2000)
return 5;
@ -67,33 +72,44 @@ u32 elf_load(u8 *src, u32 pid)
header = (elf32 *) src;
program = (elf32p *) (src + header->e_phoff);
code = elf_test(src);
if (code!=0) {
printf("Erreur de chargement ELF, %s !\r\n",elf_errors[code-1]);
if (code != 0)
{
printf("Erreur de chargement ELF, %s !\r\n",
elf_errors[code - 1]);
return NULL;
}
for (i = 0; i < header->e_phnum; i++, program++) {
if (program->p_type == PT_LOAD) {
for (i = 0; i < header->e_phnum; i++, program++)
{
if (program->p_type == PT_LOAD)
{
v_begin = program->p_vaddr;
v_end = program->p_vaddr + program->p_memsz;
if (v_begin < USER_CODE) {
if (v_begin < USER_CODE)
{
printf("Ne peut charger l'executable en desssous de l'adresse %X\r\n", USER_CODE);
return 0;
}
if (v_end > USER_STACK) {
if (v_end > USER_STACK)
{
printf("Ne peut charger l'executable au desssus de l'adresse %X\r\n", USER_STACK);
return 0;
}
if (program->p_flags == PF_X + PF_R) {
if (program->p_flags == PF_X + PF_R)
{
processes[pid].exec_low = (u8 *) v_begin;
processes[pid].exec_high = (u8 *) v_end;
}
if (program->p_flags == PF_W + PF_R) {
if (program->p_flags == PF_W + PF_R)
{
processes[pid].bss_low = (u8 *) v_begin;
processes[pid].bss_high = (u8 *) v_end;
}
memcpy((u8 *) (src + program->p_offset),(u8 *) v_begin , program->p_filesz,0);
memcpy((u8 *) (src + program->p_offset),
(u8 *) v_begin, program->p_filesz, 0);
if (program->p_memsz > program->p_filesz)
for (i = program->p_filesz, ptr = (u8 *) program->p_vaddr; i < program->p_memsz; i++)
for (i = program->p_filesz, ptr =
(u8 *) program->p_vaddr;
i < program->p_memsz; i++)
ptr[i] = 0;
}
}
@ -104,10 +120,12 @@ u32 elf_load(u8 *src, u32 pid)
/*******************************************************************************/
/* Initialise la liste des processus */
void task_init() {
void task_init()
{
u32 i = 0;
processes = (process *) vmalloc(sizeof(process) * MAXNUMPROCESS);
while (i++ < MAXNUMPROCESS) {
while (i++ < MAXNUMPROCESS)
{
processes[i].pid = NULL;
processes[i].status = STATUS_FREE;
}
@ -142,12 +160,14 @@ u32 task_getfreePID ()
{
u32 i = lastpid;
u32 parsed = 0;
while (processes[++i].status != STATUS_FREE && ++parsed < MAXNUMPROCESS)
while (processes[++i].status != STATUS_FREE
&& ++parsed < MAXNUMPROCESS)
{
if (i >= MAXNUMPROCESS)
i = 0;
}
if (parsed>MAXNUMPROCESS) {
if (parsed > MAXNUMPROCESS)
{
printf("PANIC: plus d'emplacement disponible pour un novueau processus\n");
return NULL;
}
@ -211,7 +231,8 @@ u32 task_create(u8 *code,bool kerneltask)
if (kerneltask)
{
processes[pid].dump.ss = SEL_KERNEL_STACK;
processes[pid].dump.esp = (u32) kstack->vaddr + PAGESIZE - 16;
processes[pid].dump.esp =
(u32) kstack->vaddr + PAGESIZE - 16;
processes[pid].dump.eflags = 0x0;
processes[pid].dump.cs = SEL_KERNEL_CODE;
processes[pid].dump.eip = elf_load(code, pid);
@ -250,9 +271,11 @@ u32 task_create(u8 *code,bool kerneltask)
processes[pid].dump.es = SEL_USER_DATA | RPL_RING3;
processes[pid].dump.fs = SEL_USER_DATA | RPL_RING3;
processes[pid].dump.gs = SEL_USER_DATA | RPL_RING3;
processes[pid].dump.cr3 = (u32) processes[pid].pdd->addr->paddr;
processes[pid].dump.cr3 =
(u32) processes[pid].pdd->addr->paddr;
processes[pid].kstack.ss0 = SEL_KERNEL_STACK;
processes[pid].kstack.esp0 = (u32) kstack->vaddr + PAGESIZE - 16;
processes[pid].kstack.esp0 =
(u32) kstack->vaddr + PAGESIZE - 16;
processes[pid].dump.eax = 0;
processes[pid].dump.ecx = 0;
processes[pid].dump.edx = 0;

View File

@ -57,7 +57,8 @@ void shell()
static u8 item[] = " \000";
int i;
bool found;
while (true) {
while (true)
{
print("\r\n# ");
getstring(&field);
print("\r\n");
@ -66,8 +67,11 @@ void shell()
strgetitem(&field, &item, ' ', 0);
strtolower(&item);
found = false;
for (i = 0; i < sizeof(commands)/sizeof(commands[0]); i++) {
if (strcmp(&item, &commands[i].name) == 0) {
for (i = 0; i < sizeof(commands) / sizeof(commands[0]);
i++)
{
if (strcmp(&item, &commands[i].name) == 0)
{
(*commands[i].function) (&field);
found = true;
break;
@ -172,7 +176,8 @@ int logo()
int help()
{
print("Commandes disponibles :\r\n\r\n");
for(u32 i=0;i<sizeof(commands)/sizeof(commands[0]);i++) {
for (u32 i = 0; i < sizeof(commands) / sizeof(commands[0]); i++)
{
printf("%s \r\n", &commands[i].name);
}
return 0;
@ -193,7 +198,8 @@ int bpset(u8* commandline)
}
strgetitem(commandline, &arg, ' ', 1);
numero = strtoint(&arg);
if (numero>3) {
if (numero > 3)
{
print("numero incorrect");
return;
}
@ -227,7 +233,8 @@ int bpclr(u8* commandline)
}
strgetitem(commandline, &arg, ' ', 1);
numero = strtoint(&arg);
if (numero>3) {
if (numero > 3)
{
print("numero incorrect");
return;
}
@ -283,11 +290,13 @@ int view(u8* commandline)
size = strtoint(&arg);
if (strgetnbitems(commandline, ' ') < 4)
format = 'b';
else {
else
{
strgetitem(commandline, &arg, ' ', 3);
format = arg[0];
}
switch (format) {
switch (format)
{
case 'c':
pointerb = address;
nbligne = 12;
@ -312,11 +321,13 @@ int view(u8* commandline)
}
printf("Adresse %Y - % hhu", address, size);
for (u32 i = 0; i < size; i++)
switch (format) {
switch (format)
{
case 'c':
if (i % nbligne == 0)
printf("\r\n:%Y - ", pointerb);
printf("%hhY \33[40C%c\33[41D",*(pointerb),*(pointerb++));
printf("%hhY \33[40C%c\33[41D",
*(pointerb), *(pointerb++));
break;
case 'b':
if (i % nbligne == 0)
@ -402,11 +413,13 @@ int err(u8* commandline)
asm("mov $0x666, %ax; ltr %ax");
break;
case 14:
if (random(0, 100)>50) {
if (random(0, 100) > 50)
{
print("Creation d'une erreur de page en ecriture !\r\n");
asm("movl $0x66666666,(0xE0000000)");
}
else {
else
{
print("Creation d'une erreur de page en lecture !\r\n");
asm("movl (0xD0000000),%eax");
}
@ -491,14 +504,16 @@ int rebootnow()
int test3d()
{
videoinfos *vinfo = getvideo_info();
if (!vinfo->isgraphic) {
if (!vinfo->isgraphic)
{
print("Mode graphique necessaire afin de lancer ce programme\r\n");
return 1;
}
model3d model;
float factor = 100.0f;
type3D type = TYPE3D_POINTS;
matrix44 rotatex,rotatey,rotatez,mrotatex,mrotatey,mrotatez,identity;
matrix44 rotatex, rotatey, rotatez, mrotatex, mrotatey, mrotatez,
identity;
matrix44_homogen(&identity);
matrix44_rotation_x(0.1f, &rotatex);
matrix44_rotation_y(0.1f, &rotatey);
@ -520,7 +535,8 @@ int test3d()
clearscreen();
show3dmodel(&model, transformation, &origin, factor, type);
achar = waitascii();
switch(achar) {
switch (achar)
{
case '1':
load3ds(&man, sizeof(man), &model);
break;
@ -552,7 +568,8 @@ int test3d()
factor += 10.0;
break;
case '*':
switch(type) {
switch (type)
{
case TYPE3D_POINTS:
type = TYPE3D_LINES;
break;
@ -573,14 +590,16 @@ int test3d()
int test2d()
{
videoinfos *vinfo = getvideo_info();
if (!vinfo->isgraphic) {
if (!vinfo->isgraphic)
{
print("Mode graphique necessaire afin de lancer ce programme\r\n");
return 1;
}
struct vertex2d a, b, c;
randomize();
u32 color;
for (int i = 0; i < 2000; i++) {
for (int i = 0; i < 2000; i++)
{
a.x = random(0, vinfo->currentwidth);
a.y = random(0, vinfo->currentheight);
b.x = random(0, vinfo->currentwidth);
@ -594,7 +613,8 @@ int test2d()
v_line(&a, &b, color);
}
waitascii();
for (int i = 0; i < 2000; i++) {
for (int i = 0; i < 2000; i++)
{
a.x = random(0, vinfo->currentwidth);
a.y = random(0, vinfo->currentheight);
b.x = random(0, vinfo->currentwidth);
@ -622,13 +642,15 @@ int showidt()
idtdes *desc;
struct idtr idtreg;
sidt(&idtreg);
printf("Information sur l'IDT\r\nAdresse:%X Limite:%hX\r\n", idtreg.base,
(u32) idtreg.limite);
printf("Information sur l'IDT\r\nAdresse:%X Limite:%hX\r\n",
idtreg.base, (u32) idtreg.limite);
desc = idtreg.base;
for (index = 0; index < idtreg.limite / sizeof(idtdes); index++) {
for (index = 0; index < idtreg.limite / sizeof(idtdes); index++)
{
u32 select = desc[index].select;
u32 offset =
desc[index].offset0_15 + (desc[index].offset16_31 << 16);
desc[index].offset0_15 +
(desc[index].offset16_31 << 16);
u32 type = desc[index].type & 0x0F00;
u8 *typestr1, *typestr2;
if (i >= 32 & i <= 39)
@ -651,9 +673,11 @@ int showidt()
typestr2 = "LDTDES";
else
print("inconnu");
printf("%s % hu %hY:%Y - %s\r\n", typestr1, i++, select, offset, typestr2);
printf("%s % hu %hY:%Y - %s\r\n", typestr1, i++, select,
offset, typestr2);
if (i % 32 == 0) {
if (i % 32 == 0)
{
print("\r\n<Appuyez sur une touche>\r\n");
waitascii();
}
@ -669,8 +693,10 @@ int showgdt()
u32 index;
struct gdtr gdtreg;
sgdt(&gdtreg);
printf("Information sur la GDT\r\nAdresse:%X Limite:%hX\r\n", gdtreg.base, gdtreg.limite);
for (index = 0; index < gdtreg.limite ; index+=sizeof(gdtdes)) {
printf("Information sur la GDT\r\nAdresse:%X Limite:%hX\r\n",
gdtreg.base, gdtreg.limite);
for (index = 0; index < gdtreg.limite; index += sizeof(gdtdes))
{
if (!isdesvalid(index))
printf("\033[31m");
printf("SEL =%hY %Y %Y DPL=%d %cS%d [%c%c%c] %h ub\033[0m\r\n", index, getdesbase(index), getdeslimit(index), getdesdpl(index), getdestype(index), getdessize(index), getdesbit3(index), getdesbit2(index), getdesbit1(index), getdesalign(index));
@ -687,10 +713,7 @@ int detectcpu()
u8 noproc[] = "\033[31mInconnu\033[0m\000";
strcpy(&noproc, &cpu.detectedname);
getcpuinfos(&cpu);
printf
("\r\nDetection du processeur\r\033[1m Revision \t:%d\r Modele \t:%d\r Famille \t:%d\r Nom cpuid\t:%s\rJeux d'instruction\t:%s\033[0m\r\n\000",
cpu.stepping, cpu.models, cpu.family, &cpu.detectedname,
&cpu.techs);
printf("\r\nDetection du processeur\r\033[1m Revision \t:%d\r Modele \t:%d\r Famille \t:%d\r Nom cpuid\t:%s\rJeux d'instruction\t:%s\033[0m\r\n\000", cpu.stepping, cpu.models, cpu.family, &cpu.detectedname, &cpu.techs);
return 0;
}

View File

@ -9,7 +9,8 @@
s8 strcmp(const u8 * src, const u8 * dest)
{
register s8 result;
do {
do
{
if ((result = *src - *dest++) != 0)
break;
}
@ -66,7 +67,8 @@ u8 *strcpy(const u8 * src, u8 * dest)
u8 *strncpy(const u8 * src, u8 * dest, u32 count)
{
u8 *temp = dest;
while (count) {
while (count)
{
if ((*temp = *src) != 0)
src++;
temp++;
@ -92,7 +94,8 @@ u8 *strcat(const u8 * src, u8 * dest)
void strtolower(u8 * src)
{
while (*src != 0) {
while (*src != 0)
{
if ((*src >= 'A') && (*src <= 'Z'))
*src = *src + 'a' - 'A';
src++;
@ -104,7 +107,8 @@ void strtolower(u8 * src)
void strtoupper(u8 * src)
{
while (*src != 0) {
while (*src != 0)
{
if ((*src >= 'a') && (*src <= 'z'))
*src = *src - ('a' - 'A');
src++;
@ -116,7 +120,8 @@ void strtoupper(u8 * src)
void strinvertcase(u8 * src)
{
while (*src != 0) {
while (*src != 0)
{
if ((*src >= 'A') && (*src <= 'Z'))
*src = *src + 'a' - 'A';
else if ((*src >= 'a') && (*src <= 'z'))
@ -132,7 +137,8 @@ void stronecase(u8 * src)
{
if ((*src >= 'a') && (*src <= 'z'))
*src = *src - ('a' - 'A');
while (*src != 0) {
while (*src != 0)
{
src++;
if ((*src >= 'A') && (*src <= 'Z'))
*src = *src + 'a' - 'A';
@ -153,7 +159,8 @@ void strsetlen(u8 * src, u32 size)
void strinvert(u8 * src)
{
u8 *dst = src + strlen(src) - 1;
while (src < dst) {
while (src < dst)
{
u8 char1 = *dst;
u8 char2 = *src;
*dst = char2;
@ -169,7 +176,8 @@ void strinvert(u8 * src)
void strreplace(u8 * src, u8 search, u8 replaced)
{
u8 *pos = strchr(src, search);
while (pos != 0) {
while (pos != 0)
{
*pos = replaced;
pos = strchr(src, search);
}
@ -217,7 +225,8 @@ void strdelete(u8 * src, u32 index, u32 size)
{
u32 i;
u32 realsize = strlen(src) - index - size;
for (i = 0; (*(src + index + size + i) != 0) && (i < realsize); i++)
for (i = 0; (*(src + index + size + i) != 0) && (i < realsize);
i++)
*(src + index + i) = *(src + index + size + i);
*(src + index + i) = '\000';
}
@ -243,9 +252,11 @@ void strinsert(u8 * src, u8 * dest, u32 index)
void strcompressdelimiter(u8 * src, u8 delim)
{
u8 *pos = strchr(src, delim);
while (pos != 0) {
while (pos != 0)
{
u8 i;
for (i = 0; (*(pos + i) != 0) && (*(pos + i) == delim); i++) ;
for (i = 0; (*(pos + i) != 0) && (*(pos + i) == delim);
i++);
if (i > 1)
strdelete(pos, 1, i - 1);
pos = strchr(pos + 1, delim);
@ -289,7 +300,8 @@ u32 strgetnbitems(u8 * src, u8 delim)
return 0;
number++;
u8 *pos = strchr(src, delim);
while (pos != 0) {
while (pos != 0)
{
pos = strchr(pos + 1, delim);
number++;
}
@ -307,7 +319,8 @@ u8 strgetminbase(u8 * src)
u8 *dst = &temp;
strtoupper(strcpy(src, &temp));
u8 max = 0;
while (*dst != 0) {
while (*dst != 0)
{
u32 result = strchrpos(&base, *dst++);
if (result == 0)
return 0;
@ -337,19 +350,25 @@ u8 strgetbase(u8 * src)
{
u8 temp[] = " \000";
strleft(src, &temp, 2);
if (strcmp(&temp, &hexa) == 0) {
if (strcmp(&temp, &hexa) == 0)
{
declaredbase = 16;
u8 size = strlen(src);
strright(src, &temp, size - 2);
minbase = strgetminbase(&temp);
} else {
}
else
{
strright(src, &temp, 1);
declaredbase = basesnum[strchrpos(&bases, temp[0])];
if (declaredbase > 0) {
if (declaredbase > 0)
{
u8 size = strlen(src);
strleft(src, &temp, size - 1);
minbase = strgetminbase(&temp);
} else {
}
else
{
minbase = strgetminbase(src);
declaredbase = minbase;
}
@ -379,7 +398,8 @@ u32 strtoint(u8 * src)
while (*temp == 0 || *temp == 'b' || *temp == 'o' || *temp == 'd'
|| *temp == 'h')
temp--;
while (src + shorter <= temp) {
while (src + shorter <= temp)
{
u8 achar = *temp--;
if ((achar >= 'a') && (achar <= 'z'))
achar = achar - ('a' - 'A');

View File

@ -29,7 +29,8 @@ char ctype[] = {
CT_UP, CT_UP, CT_UP, CT_UP,
/* 'X' */ CT_UP, CT_UP, CT_UP, CT_PUN,
CT_PUN, CT_PUN, CT_PUN, CT_PUN,
/* '`' */ CT_PUN, CT_LOW | CT_HEX, CT_LOW | CT_HEX, CT_LOW | CT_HEX,
/* '`' */ CT_PUN, CT_LOW | CT_HEX, CT_LOW | CT_HEX,
CT_LOW | CT_HEX,
CT_LOW | CT_HEX, CT_LOW | CT_HEX, CT_LOW | CT_HEX, CT_LOW,
/* h' */ CT_LOW, CT_LOW, CT_LOW, CT_LOW,
CT_LOW, CT_LOW, CT_LOW, CT_LOW,

View File

@ -17,7 +17,8 @@ static capabilities vesacapabilities[] = {
/*******************************************************************************/
/* Deplace l'adresse virtuelle en mode paginee */
void VESA_remap_memory(u32 vaddr) {
void VESA_remap_memory(u32 vaddr)
{
struct multiboot_tag_framebuffer *tagfb = getgrubinfo_fb();
u32 len = infos.pagesize * 2;
u32 paddr = tagfb->common.framebuffer_addr;
@ -28,19 +29,24 @@ void VESA_remap_memory(u32 vaddr) {
/*******************************************************************************/
/* Detecte si le hardware est disponible, return NULL ou pointeur sur le type de pilote */
u8 *VESA_detect_hardware(void) {
u8 *VESA_detect_hardware(void)
{
struct multiboot_tag_framebuffer *tagfb = getgrubinfo_fb();
switch (tagfb->common.framebuffer_type)
{
case MULTIBOOT_FRAMEBUFFER_TYPE_RGB:
vesacapabilities[0].modenumber = 0x0;
vesacapabilities[0].width=tagfb->common.framebuffer_width;
vesacapabilities[0].height=tagfb->common.framebuffer_height;
vesacapabilities[0].width =
tagfb->common.framebuffer_width;
vesacapabilities[0].height =
tagfb->common.framebuffer_height;
vesacapabilities[0].graphic = true;
vesacapabilities[0].depth=tagfb->common.framebuffer_bpp;
vesacapabilities[0].depth =
tagfb->common.framebuffer_bpp;
vesacapabilities[0].refresh = 0x0;
infos.baseaddress = tagfb->common.framebuffer_addr;
infos.currentpitch=tagfb->common.framebuffer_pitch;
infos.currentpitch =
tagfb->common.framebuffer_pitch;
return "LEGACY";
break;
default:
@ -60,7 +66,8 @@ static u8 realsize;
u8 VESA_setvideo_mode(u8 mode)
{
if (mode>0) return 1;
if (mode > 0)
return 1;
infos.currentmode = mode;
infos.currentwidth = vesacapabilities[0].width;
infos.currentheight = vesacapabilities[0].height;
@ -81,28 +88,35 @@ u8 VESA_setvideo_mode(u8 mode)
/*******************************************************************************/
/* Renvoie le nom du driver */
u8 *VESA_getvideo_drivername (void) {
u8 *VESA_getvideo_drivername(void)
{
return "VESA";
}
/*******************************************************************************/
/* Renvoie un pointeur sur la structure des capacités graphiques */
u8 *VESA_getvideo_capabilities (void) {
u8 *VESA_getvideo_capabilities(void)
{
return vesacapabilities;
}
/*******************************************************************************/
/* Renvoie un pointeur sur l'état courant de la carte */
videoinfos *VESA_getvideo_info (void) {
videoinfos *VESA_getvideo_info(void)
{
return &infos;
}
/*******************************************************************************/
/* Effecture un mouvement de la mémoire centrale vers la mémoire video (linéarisée) */
u32 VESA_mem_to_video (void *src,u32 dst, u32 size, bool increment_src) {
u32 realdst=infos.baseaddress + infos.currentactivepage * infos.pagesize+dst;
switch (infos.currentdepth) {
u32 VESA_mem_to_video(void *src, u32 dst, u32 size, bool increment_src)
{
u32 realdst =
infos.baseaddress +
infos.currentactivepage * infos.pagesize + dst;
switch (infos.currentdepth)
{
case 32:
if (!increment_src)
{
@ -128,9 +142,14 @@ u32 VESA_video_to_mem (u32 src,void *dst, u32 size)
/* Effecture un mouvement de la mémoire video (linéarisé) vers la mémoire vidéo (linéarisée) */
u32 VESA_video_to_video(u32 src, u32 dst, u32 size)
{
u32 realsrc=infos.baseaddress + infos.currentactivepage * infos.pagesize+src;
u32 realdst=infos.baseaddress + infos.currentactivepage * infos.pagesize+dst;
switch (infos.currentdepth) {
u32 realsrc =
infos.baseaddress +
infos.currentactivepage * infos.pagesize + src;
u32 realdst =
infos.baseaddress +
infos.currentactivepage * infos.pagesize + dst;
switch (infos.currentdepth)
{
case 32:
movsd(realsrc, realdst, size >> 2);
break;
@ -176,4 +195,3 @@ void VESA_wait_hretrace(void)
{
while ((inb(STATE) & 1) == 0);
}

136
lib/vga.c
View File

@ -13,13 +13,16 @@ static videoinfos infos;
/*******************************************************************************/
/* Deplace l'adresse virtuelle en mode paginee */
void VGA_remap_memory(u32 vaddr) {
virtual_range_use_kernel(vaddr, GRPHSCREEN, ENDOFVMEM-GRPHSCREEN, PAGE_NOFLAG);
void VGA_remap_memory(u32 vaddr)
{
virtual_range_use_kernel(vaddr, GRPHSCREEN, ENDOFVMEM - GRPHSCREEN,
PAGE_NOFLAG);
}
/*******************************************************************************/
/* Detecte si le hardware est disponible, return NULL ou pointeur sur le type de pilote */
u8 *VGA_detect_hardware(void) {
u8 *VGA_detect_hardware(void)
{
return "LEGACY";
}
@ -33,7 +36,8 @@ u32 getbase(void)
base = inb(GRAPHICS + 1);
base >>= 2;
base &= 3;
switch (base) {
switch (base)
{
case 0:
case 1:
base = 0xA0000;
@ -58,9 +62,12 @@ static u8 realsize;
u8 VGA_setvideo_mode(u8 mode)
{
u32 index = 0;
while(vgacapabilities[index].modenumber!=0xFF) {
if (vgacapabilities[index].modenumber==mode) {
infos.currentmode=vgacapabilities[index].modenumber;
while (vgacapabilities[index].modenumber != 0xFF)
{
if (vgacapabilities[index].modenumber == mode)
{
infos.currentmode =
vgacapabilities[index].modenumber;
break;
}
index++;
@ -79,8 +86,10 @@ u8 VGA_setvideo_mode(u8 mode)
infos.isgraphic = vgacapabilities[index].graphic;
infos.isblinking = false;
infos.iscursorvisible = false;
if (infos.isgraphic) {
switch (infos.currentdepth) {
if (infos.isgraphic)
{
switch (infos.currentdepth)
{
case 1:
/* mode N&B */
infos.currentpitch = infos.currentwidth;
@ -88,7 +97,8 @@ u8 VGA_setvideo_mode(u8 mode)
break;
case 2:
/* mode 4 couleurs */
infos.currentpitch = (infos.currentwidth << 1);
infos.currentpitch =
(infos.currentwidth << 1);
realsize = 2;
break;
case 4:
@ -98,13 +108,19 @@ u8 VGA_setvideo_mode(u8 mode)
break;
case 8:
/* mode 256 couleurs */
if (modes[index].sequencer.Sequencer_Memory_Mode_Register == 0x0E) {
if (modes[index].sequencer.
Sequencer_Memory_Mode_Register == 0x0E)
{
/* mode chainé (plus rapide mais limité en mémoire) */
infos.currentpitch = infos.currentwidth;
infos.currentpitch =
infos.currentwidth;
realsize = 8;
} else {
}
else
{
/* mode non chainé */
infos.currentpitch = infos.currentwidth >> 2;
infos.currentpitch =
infos.currentwidth >> 2;
realsize = 9;
}
break;
@ -113,13 +129,16 @@ u8 VGA_setvideo_mode(u8 mode)
}
infos.pagesize = infos.currentheight * infos.currentpitch;
}
else {
else
{
infos.currentpitch = infos.currentwidth * 2;
infos.pagesize = infos.currentheight * infos.currentpitch;
realsize = 0;
}
infos.pagesnumber = (PLANESIZE / infos.pagesize);
infos.baseaddress=(modes[index].ctrc.Cursor_Location_High_Register << 8) + modes[index].ctrc.Cursor_Location_Low_Register + getbase();
infos.baseaddress =
(modes[index].ctrc.Cursor_Location_High_Register << 8) +
modes[index].ctrc.Cursor_Location_Low_Register + getbase();
/* Initialise les registre "divers" */
outb(MISC_WRITE, modes[index].misc);
/* Initialise les registre d'etat */
@ -145,27 +164,33 @@ u8 VGA_setvideo_mode(u8 mode)
/*******************************************************************************/
/* Renvoie le nom du driver */
u8 *VGA_getvideo_drivername (void) {
u8 *VGA_getvideo_drivername(void)
{
return "VGA";
}
/*******************************************************************************/
/* Renvoie un pointeur sur la structure des capacités graphiques */
u8 *VGA_getvideo_capabilities (void) {
u8 *VGA_getvideo_capabilities(void)
{
return vgacapabilities;
}
/*******************************************************************************/
/* Renvoie un pointeur sur l'état courant de la carte */
videoinfos *VGA_getvideo_info (void) {
videoinfos *VGA_getvideo_info(void)
{
return &infos;
}
/*******************************************************************************/
/* Effecture un mouvement de la mémoire centrale vers la mémoire video (linéarisée) */
u32 VGA_mem_to_video (void *src,u32 dst, u32 size, bool increment_src) {
u32 realdst=infos.baseaddress + infos.currentactivepage * infos.pagesize+dst;
u32 VGA_mem_to_video(void *src, u32 dst, u32 size, bool increment_src)
{
u32 realdst =
infos.baseaddress +
infos.currentactivepage * infos.pagesize + dst;
switch (realsize)
{
case 0:
@ -194,13 +219,17 @@ u32 VGA_mem_to_video (void *src,u32 dst, u32 size, bool increment_src) {
u8 tmp = (u8) (src);
if (size % 4 == 0)
{
u32 pattern = tmp + (tmp<<8) + (tmp<<16) + (tmp<<24);
stosd(pattern,realdst,(size>>2));
u32 pattern =
tmp + (tmp << 8) +
(tmp << 16) + (tmp << 24);
stosd(pattern, realdst,
(size >> 2));
}
else if (size % 2 == 0)
{
u32 pattern = tmp + (tmp << 8);
stosw(pattern,realdst,(size>>1));
stosw(pattern, realdst,
(size >> 1));
}
else
{
@ -208,7 +237,8 @@ u32 VGA_mem_to_video (void *src,u32 dst, u32 size, bool increment_src) {
stosb(pattern, realdst, size);
}
}
else {
else
{
if (size % 4 == 0)
{
movsd(src, realdst, size >> 2);
@ -235,7 +265,9 @@ u32 VGA_mem_to_video (void *src,u32 dst, u32 size, bool increment_src) {
/* Effecture un mouvement de la mémoire video (linéarisée) vers la mémoire centrale*/
u32 VGA_video_to_mem(u32 src, void *dst, u32 size)
{
u32 realsrc=infos.baseaddress + infos.currentactivepage * infos.pagesize+src;
u32 realsrc =
infos.baseaddress +
infos.currentactivepage * infos.pagesize + src;
switch (realsize)
{
case 0:
@ -265,7 +297,9 @@ u32 VGA_video_to_mem (u32 src,void *dst, u32 size)
/* Effecture un mouvement de la mémoire video (linéarisé) vers la mémoire vidéo (linéarisée) */
u32 VGA_video_to_video(u32 src, u32 dst, u32 size)
{
u32 base=infos.baseaddress + infos.currentactivepage * infos.pagesize;
u32 base =
infos.baseaddress +
infos.currentactivepage * infos.pagesize;
u32 realsrc = base + src;
u32 realdst = base + dst;
switch (realsize)
@ -316,7 +350,8 @@ void VGA_page_set(u8 page)
void VGA_page_show(u8 page)
{
if (page < infos.pagesnumber) {
if (page < infos.pagesnumber)
{
u16 addr;
addr = page * infos.pagesize / 2;
outb(CCRT, 0x0C);
@ -334,7 +369,8 @@ static splitY=0;
void VGA_page_split(u16 y)
{
if (y!=0) {
if (y != 0)
{
u16 addr;
if (!infos.isgraphic)
addr = (y << 3);
@ -393,7 +429,8 @@ void VGA_wait_hretrace(void)
void VGA_cursor_enable(void)
{
if (!infos.isgraphic) {
if (!infos.isgraphic)
{
u8 curs;
/* active le curseur hardware */
outb(CCRT, 10);
@ -408,7 +445,8 @@ void VGA_cursor_enable(void)
void VGA_cursor_disable(void)
{
if (!infos.isgraphic) {
if (!infos.isgraphic)
{
u8 curs;
/* Desactive le curseur hardware */
outb(CCRT, 10);
@ -439,10 +477,12 @@ void useplane(u8 plan)
void VGA_cursor_set(u16 x, u16 y)
{
if (!infos.isgraphic) {
if (!infos.isgraphic)
{
u16 pos;
if (splitY == 0)
pos = (infos.currentshowedpage * infos.pagesize / 2 + x + y * infos.currentwidth);
pos = (infos.currentshowedpage * infos.pagesize /
2 + x + y * infos.currentwidth);
else
pos = (x + y * infos.currentwidth);
outb(CCRT, 0x0F);
@ -470,7 +510,8 @@ u32 VGA_font_load(u8 * def, u8 size, u8 font)
if (font < 4)
base = (u8 *) (getbase() + (font << 14));
else
base = (u8 *) (getbase() + ((((font - 4) << 1) + 1) << 13));
base = (u8 *) (getbase() +
((((font - 4) << 1) + 1) << 13));
/* sauve les anciens registres */
outb(SEQUENCER, 2);
oldregs[0] = inb(SEQUENCER + 1);
@ -490,7 +531,8 @@ u32 VGA_font_load(u8 * def, u8 size, u8 font)
outb(GRAPHICS + 1, oldregs[4] & ~0x02);
/* utilisation du plan N°2 */
useplane(2);
for (i = 0; i < 256; i++) {
for (i = 0; i < 256; i++)
{
memcpy(def, base + i * 32, size, 1);
def += size;
}
@ -512,7 +554,8 @@ u32 VGA_font_load(u8 * def, u8 size, u8 font)
void VGA_font1_set(u8 num)
{
if (!infos.isgraphic) {
if (!infos.isgraphic)
{
num &= 0x07;
outb(SEQUENCER, 3);
outb(SEQUENCER + 1,
@ -527,7 +570,8 @@ void VGA_font1_set(u8 num)
void VGA_font2_set(u8 num)
{
if (!infos.isgraphic) {
if (!infos.isgraphic)
{
num &= 0x07;
outb(SEQUENCER, 3);
outb(SEQUENCER + 1,
@ -542,7 +586,8 @@ void VGA_font2_set(u8 num)
void VGA_blink_enable(void)
{
if (!infos.isgraphic) {
if (!infos.isgraphic)
{
outb(CCRT, 0x10);
outb(CCRT + 1, (inb(SEQUENCER + 1) | 0x04));
infos.isblinking = true;
@ -554,7 +599,8 @@ void VGA_blink_enable(void)
void VGA_blink_disable(void)
{
if (!infos.isgraphic) {
if (!infos.isgraphic)
{
outb(CCRT, 0x10);
outb(CCRT + 1, (inb(SEQUENCER + 1) & ~0x04));
infos.isblinking = false;
@ -568,7 +614,8 @@ vers le registre sp
void outreg(u16 port, u8 * src, u16 num)
{
int i;
for (i = 0; i < num; i++) {
for (i = 0; i < num; i++)
{
outb(port, i);
outb(port + 1, *src++);
}
@ -581,7 +628,8 @@ vers le registre sp
void outregsame(u16 port, u8 * src, u16 num)
{
int i;
for (i = 0; i < num; i++) {
for (i = 0; i < num; i++)
{
inb(port);
outb(port, i);
outb(port, *src++);
@ -595,7 +643,8 @@ vers portion de m
void inreg(u16 port, u8 * src, u16 num)
{
int i;
for (i = 0; i < num; i++) {
for (i = 0; i < num; i++)
{
outb(port, i);
*src++ = inb(port + 1);
}
@ -608,7 +657,8 @@ vers portion de m
void inregsame(u16 port, u8 * src, u16 num)
{
int i;
for (i = 0; i < num; i++) {
for (i = 0; i < num; i++)
{
inb(port);
outb(port, i);
*src++ = inb(port);

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@ harddisk: final/harddisk.img.final
uefi: final/harddiskuefi.img.final
install:
(sudo apt-get install nasm gcc qemu fusefat fuseext2 cgdb ovmf bsdmainutils tar bsdmainutils indent binutils bochs bochs-x bochsbios)
(sudo apt-get install nasm gcc qemu fusefat fuseext2 cgdb ovmf bsdmainutils tar bsdmainutils indent binutils bochs bochs-x bochsbios dos2unix)
togit:
make -C system togit

View File

@ -41,4 +41,3 @@
1:" : "=a" (_v) : "a" (syscall), "b" (arg1), "S" (arg2), "D" (arg3) : "ecx","edx","memory"); \
_v; \
})

View File

@ -46,7 +46,8 @@ void error()
int main(u32 magic, u32 addr)
{
cli();
if (magic == MULTIBOOT2_BOOTLOADER_MAGIC) initmultiboot(addr);
if (magic == MULTIBOOT2_BOOTLOADER_MAGIC)
initmultiboot(addr);
initdriver();
registerdriver(&vgafonctions);
registerdriver(&vesafonctions);
@ -83,17 +84,20 @@ int main(u32 magic, u32 addr)
ok();
print(" -Installation du handler timer (IRQ 0)");
setidt((u32) timer, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 32);
setidt((u32) timer, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 32);
enableirq(0);
ok();
print(" -Installation du handler clavier (IRQ 1)");
setidt((u32) keyboard, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 33);
setidt((u32) keyboard, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 33);
enableirq(1);
ok();
print(" -Installation du handler souris (IRQ12+Cascade IRQ2)");
setidt((u32) mouse, SEL_KERNEL_CODE, ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 100);
setidt((u32) mouse, SEL_KERNEL_CODE,
ENTRY_PRESENT | ENTRY_RING0 | INTGATE, 100);
enableirq(2);
enableirq(12);
if (initmouse() != 1)