leifo / haujobb-amiga Goto Github PK
View Code? Open in Web Editor NEWThe Haujobb Amiga Framework
Home Page: http://www.dig-id.de/amiga/framework
The Haujobb Amiga Framework
Home Page: http://www.dig-id.de/amiga/framework
Hey, I am completely new to amiga and a linux user, so I've been poking around in this framework the last few days and have now made it fully working on linux. And the cross compiled examples work in my FS-UAE setup.
This writeup contains the necessary steps to setup. I had to change the source code at some points. I don't have a real amiga, so maybe some of these changes shouldn't be done. But they were necessary for the examples to work on both the emulator and when run from qt creator.
Hope this helps someone!
Add the following exports to your .zshrc or .bashrc
export VBCC="${HOME}/.local/vbcc"
export PATH=$VBCC/bin:$PATH
export NDK="${HOME}/.local/NDK"
export NDK_INC=$NDK/Include/include_h
export NDK_INC_I=$NDK/Include/include_i
export NDK_LIB=$NDK/Include/linker_libs
export AMIGA="${HOME}/FS-UAE/Hard Drives/wip"
This is the setup official guide:
https://www.dig-id.de/amiga/framework/
It is very windows specific, so it is easier to install the tools necessary by following this guide:
https://blitterstudio.com/setting-up-an-amiga-cross-compiler/
And part of this guide for vbcc compilation byte endian questions:
https://blitterstudio.com/setting-up-an-amiga-cross-compiler-windows/
wos/makefile change ASFLAGS to:
ASFLAGS = -Fhunk -m68020 -m68882 -I$(NDK)/NDK_3.9/Include/include_i
rename wos/wos_v1.63.s to wos/Wos_v1.63.s
in wos directory: make
Change makefile like this:
CFLAGS = +aos68k -O=23999 -cpu=68060 -fpu=68060 -DAMIGA -c99 -speed -k
INCDIR := $(VBCC)/posix/include $(VBCC)/targets/m68k-amigaos/include $(INCDIR) ./ $(NDK_INC)
LIBDIR := $(VBCC)/targets/m68k-amigaos/lib
Run make in the build directory
Install gcc, qtcreator and gdb with your package manager
Open "stars.pro" file in qtcreator
Remove "-lopengl32" by commenting out this line
LIBS += -lopengl32
Change end of HEADERS
../shared/tools/rand.h \
../shared/math/imath.h
Change end of SOURCES
../shared/tools/rand.c \
../shared/math/imath.c
in main.c:
Change
#ifndef WIN32
to
#ifdef AMIGA
in wos.cpp Comment out:
delete[] mAudioBuffer;
Install libbass (bass24)
Open hellodemo.pro in qtcreator
And in hellodemo.pro do the following:
Uncomment
LIBS += -lbass
Comment
LIBS += ../shared/libs/bass24/c/bass.lib
Change
LIBS += -lws2_32
To
win32 {
LIBS += -lws2_32
}
Change
SOURCES += \
src/main.c \
src/stars/starseffect.c \
src/main.c \
src/movetable/movetableeffect.c \
src/pictures/pictureeffect.c
to
SOURCES += \
src/main.c \
src/stars/starseffect.c \
src/movetable/movetableeffect.c \
src/pictures/pictureeffect.c
Navigate to the generated qt project folder "build-hellodemo-Desktop-Debug"
and copy data files from the hellodemo
cp ../hellodemo/data . -r
Add to pictureeffect.c
extern unsigned char* screenBuffer;
In main.c
replace
//screenBuffer= (unsigned char*)malloc(xres*yres*sizeof(int));
saveScreenBuffer= (unsigned char*)malloc(xres*yres*3+16);
memset32(saveScreenBuffer, 0x0, xres*yres*3+16);
// align screen buffer to 16 byte
screenBuffer= (unsigned char*)( ((unsigned int)screenBuffer+15) & ~15 );
with
saveScreenBuffer= (unsigned char*)malloc(xres*yres*3);
screenBuffer= saveScreenBuffer + xres*yres;
Install rocket: https://github.com/rocket/rocket and start it.
Open hellodemo.rocket file in hellodemo directory
Build and run the code
Change the makefile like this to compile for the amiga:
CFLAGS = +aos68k -O=23999 -cpu=68060 -fpu=68060 -DAMIGA -speed -c99 -k -DSYNC_PLAYER -DNEED_STRDUP
ASFLAGS = -Fhunk -m68020 -m68882 -I${NDK}/Include/include_i
INCDIR := $(VBCC)/posix/include $(VBCC)/targets/m68k-amigaos/include $(INCDIR) ./ $(NDK_INC)
LIBDIR := $(VBCC)/targets/m68k-amigaos/lib
Install fs-uae with your package manager
Find and download the following files:
Kickstart rom
Kickstart v3.1 r40.68 (1993)(Commodore)(A1200)[!].rom
SHA-1: e21545723fe8374e91342617604f1b3d703094f1
workbench 3.1 disk
wbench31.adf
SHA-1: 54932a937a66994f522a29e03982137b1d2302e1
classicwb:
http://classicwb.abime.net/classicweb/downloaduae.htm (the link that says "UAE")
Follow this guide:
https://fs-uae.net/installing-classicwb-in-fs-uae
After installing classicWB use this config (FS-UAE/Configurations/Default.fs-uae) - it will setup a WIP hdd as well where we can transfer demos to:
[fs-uae]
amiga_model = A1200/020
chip_memory = 2048
zorro_iii_memory = 65536
uae_fpu_model = 68882
floppy_drive_count = 0
hard_drive_0 = ~/FS-UAE/Hard Drives/ClassicWB/System_P96.hdf
hard_drive_1 = ~/FS-UAE/Hard Drives/ClassicWB/Software
hard_drive_2 = ~/FS-UAE/Hard Drives/ClassicWB/PC
hard_drive_3 = wip
fullscreen = 1
Then go to the following link and download the topmost archive for the CPU updates.
http://phase5.a1k.org/index.html
Extract the files to your wip HDD. Then boot up your amiga and drag those files into System/LIBS
After that update your config file to the following
[fs-uae]
amiga_model = A1200
chip_memory = 2048
cpu = 68060
floppy_drive_count = 0
hard_drive_0 = ~/FS-UAE/Hard Drives/COMPO_ClassicWB/System_P96.hdf
hard_drive_1 = ~/FS-UAE/Hard Drives/COMPO_ClassicWB/Software
hard_drive_2 = ~FS-UAE/Hard Drives/COMPO_ClassicWB/PC
hard_drive_3 = wip
uae_cpu_model = 68060
uae_fpu_model = 68882
zorro_iii_memory = 65536
fullscreen = 1
Hi
Compiling with QT Creator on Windows there are minor issues to fix in order to compile successfuly like adding these lines to the project files:
...
win32 {
DEFINES += _USE_MATH_DEFINES=1
DEFINES += _CRT_SECURE_NO_WARNINGS=1
LIBS += -lwinmm
}
...
HEADERS +=
...
../shared/math/imath.h
...
SOURCES +=
...
../shared/math/imath.c
...
For some strange reason windows binaries aren't recognizing the relative paths correctly to open files and I have to set full paths but I guess that's something wrong with my config. I also had problems with hellodemo on windows due to bad bass link library version. On the other hand Amiga binaries compile&run flawlessly (without changes, as the link library probably includes all the math functions).
Keep up the good work!
Crumb
Created from note for learning
Two missing file errors on:
I've could fixed them changing both lines with:
include wos:includes/wos.i
It's ok?
PS1: To compile with devpac I've had to assign devpac: volume due to lines 15 and 16 in go file,
PS2: I can't see executable files after compilation
Change text line in section 2.3 from documentation:
cd to the /examples/helloworld folder ---> cd to the /demo/helloworld folder
Fix missing Posix library to "make" examples on PC side:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.