Software > Coding

Veröffentlichung: GEMLIB für AHCC

(1/3) > >>

m0n0:

--- Code: ---GEMLIB for AHCC

 - m68k-020 and coldfire compatible binary
 - compiled for 32bit

Gemlib is the glue layer between applications and the low-level AES interface.
It is the de facto standard for GEM applications developed with GCC.
Now you can build all the software which requieres a more or less recent GEMLIB (For example cflib) with AHCC.
--- Ende Code ---

http://freeshell.de/~monokrom/geeklog/downloads/index.php?id=gemlib_ahcc_rc1

Es ist auch ein kleines Beispiel GEMLIB Programm dabei, für die Leute die Anfangen etwas in GEM zu machen evtl. noch halbwegs übersichtlich:


--- Code: ---
#include <gem.h>
#include <mt_gem.h>
#include <string.h>
#include <stdio.h>

#include <test.h>

int main(void)
{
short appid, quit = 0;
short gl_xaaes;
short a,b,c,d, aes_msg[8];
OBJECT *menu, *dialog, *obj;
char aes_name[128];
char msg[257], msg2[257], msg3[257];
char *aes_language[] = {"En", "De", "Fr", "res.", "Sp", "It", "Se"};

// Init application and load GUI resource File:
appid = appl_init();
if (rsrc_load("test.rsc") == 0){
sprintf(msg, "[1][Failed to load resource File:| |%s][Whoops!]", "test.rsc");
form_alert(3, msg);
return(1);
}

// Load specific Resource Objects:
rsrc_gaddr(R_TREE, DESKMENU, &menu);
rsrc_gaddr(R_TREE, TEST1, &dialog);

// Draw deskmenu:
menu_bar(menu, 100);
menu_bar(menu, 1);

do{
evnt_mesag(aes_msg);

switch(aes_msg[0]){

case MN_SELECTED:

switch(aes_msg[4]){

case MNU_ABOUT:

// Show About Dialog

// Get OS Info:
appl_getinfo(AES_LANGUAGE, &a, &b, &c, &d);
appl_getinfo_str(AES_VERSION, aes_name, msg, msg2, msg3);

// Start Dialog:
wind_update(BEG_UPDATE);
sprintf(dialog[LBL_LANGUAGE].ob_spec.tedinfo->te_ptext,
" AES Language: %s",
aes_language[a]);
sprintf(dialog[LBL_AES_VERSION].ob_spec.tedinfo->te_ptext,
" AES Name: %s", aes_name);
form_center(dialog, &a, &b, &c, &d);
form_dial(FMD_START, a, b, c, d, a, b, c, d);

// Draw & Handle Dialog until user presses a dialog button:
objc_draw(dialog, 0, 8, a, b, c, d);
form_do(dialog, 0);

// Exit Dialog:
form_dial(FMD_FINISH, a, b, c, d, a, b, c, d);
wind_update(END_UPDATE);

break;

case MNU_INFO_ALERT:

// Get OS Info:
appl_getinfo(AES_LANGUAGE, &a, &b, &c, &d);
appl_getinfo_str(AES_VERSION, aes_name, msg, msg2, msg3);

// Prepare Message Box Info:
sprintf(msg,
"[1]"
"[AHCC GEMLIB for m68k + Coldfire|"
"AES Version : %s|"
"AES Language: %s (%d)][OK]",
aes_name, aes_language[a], a);

// Show Info alert:
form_alert(1, msg);
break;

case MNU_QUIT:
quit = 1;
break;

default: break;
}

// Reset menu selection state:
menu_tnormal(menu, aes_msg[4], 1);
menu_tnormal(menu, aes_msg[3], 1);

default: break;
}
} while(!quit);


// Exit Application:
menu_bar(menu, 0);
rsrc_free();
appl_exit();
return(0);
}


--- Ende Code ---


simonsunnyboy:
Feine Sache, besteht die Möglichkeit auch einen 68000er Port zu machen, oder benutzt die GEMLIB float?

m0n0:
Ich probiers mal und geb dann bescheid.

m0n0:
Hallo,

hat anscheinend Problemlos geklappt :)

Im Archiv sollte nun alles enthalten sein um die GEMLIB mit AHCC für m68k zu kompilieren,
aber natürlich ist auch die .lib Datei für eine "plain 68000" CPU enthalten.

Bitte bedenken das es eine 32Bit library ist und daher int auf 32 Bit gesetzt sein muss,
ausserdem sollte der AHCC include Folder "include" verwendet werden (wie immer ;)).

Download:
http://freeshell.de/~monokrom/geeklog/downloads/index.php?id=gemlib_ahcc_latest

simonsunnyboy:
Danke! Mit welcher Compileroption im AHCC stellt man dann die 32Bit int ein?

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln