Browse Source

Merge branch 'master' of midwan/zz9000-sdk into master

- Replaced CGX headers requirement with P96 headers
- Code adapted accordingly to open the screen in the same way, only using P96 calls
- Included AmigaOS3.x binary of zz9k loader
- Fixed bracket formatting according to preferred style
master
Lukas F. Hartmann 6 months ago
parent
commit
89699fc628

+ 1
- 0
zz9k-loader/.vscode/c_cpp_properties.json View File

@@ -6,6 +6,7 @@
"${workspaceFolder}/**",
"${VBCC}/targets/m68k-amigaos/include",
"${VBCC}/ndk39/include/include_h",
"${VBCC}/P96/Include",
"${VBCC}/cybergraphics/include"
],
"defines": [],

+ 16
- 3
zz9k-loader/.vscode/tasks.json View File

@@ -7,13 +7,13 @@
"label": "Build",
"type": "shell",
"windows": {
"command": "vc +aos68k -ID:/vbcc/cybergraphics/include -c99 -O2 -o ./zz9k ./zz9k.c -lamiga -lauto"
"command": "vc +aos68k -ID:/vbcc/P96/Include -c99 -O2 -o ./zz9k ./zz9k.c -lamiga -lauto"
},
"osx": {
"command": "vc +aos68k -I/opt/vbcc/cybergraphics/include -c99 -O2 -o ./zz9k ./zz9k.c -lamiga -lauto"
"command": "vc +aos68k -I/opt/vbcc/P96/Include -c99 -O2 -o ./zz9k ./zz9k.c -lamiga -lauto"
},
"linux": {
"command": "vc +aos68k -I/opt/vbcc/cybergraphics/include -c99 -O2 -o ./zz9k ./zz9k.c -lamiga -lauto"
"command": "vc +aos68k -I/opt/vbcc/P96/Include -c99 -O2 -o ./zz9k ./zz9k.c -lamiga -lauto"
},
"group": {
"kind": "build",
@@ -21,6 +21,19 @@
}
},
{
"label": "LHA Pack",
"type": "shell",
"windows": {
"command": "lha a zz9k.lha zz9k"
},
"osx": {
"command": "lha a zz9k.lha zz9k"
},
"linux": {
"command": "lha a zz9k.lha zz9k"
}
},
{
"label": "Clean",
"type": "shell",
"windows": {

+ 5
- 2
zz9k-loader/build.cmd View File

@@ -3,8 +3,11 @@ REM Windows specific vbcc build script
REM This implies that you have the following:
REM 1) vbcc already installed and in your path (check https://blitterstudio.com/) in D:\vbcc
REM 2) The NDK 3.9 included in your "aos68k" config
REM 3) The CyberGraphX DevKit extracted in D:\vbcc\cybergraphics
REM 3) The P96 DevKit extracted in D:\vbcc\P96
REM
REM Please adapt the script accordingly if your environment is different
REM
vc +aos68k -I"D:\vbcc\cybergraphics\include" -c99 -O2 -o .\zz9k .\zz9k.c -lamiga -lauto
vc +aos68k -I"D:\vbcc\P96\Include" -c99 -O2 -o .\zz9k .\zz9k.c -lamiga -lauto

del zz9k.lha
lha a zz9k.lha zz9k

BIN
zz9k-loader/zz9k View File


+ 16
- 16
zz9k-loader/zz9k.c View File

@@ -29,8 +29,7 @@

#include <proto/intuition.h>
#include <intuition/screens.h>
#include <cybergraphx/cybergraphics.h>
#include <proto/cybergraphics.h>
#include <proto/Picasso96.h>
#include <devices/audio.h>
#include <devices/input.h>
#include <exec/ports.h>
@@ -54,25 +53,26 @@ volatile MNTZZ9KRegs* regs;
struct Screen* zz9k_screen;

void open_screen(int w, int h) {
uint32_t bmid=BestCModeIDTags(CYBRBIDTG_NominalWidth, w,
CYBRBIDTG_NominalHeight, h,
CYBRBIDTG_Depth, 24,
TAG_DONE);
//printf("Mode ID: %lx\n", bmid);
zz9k_screen = OpenScreenTags(NULL,
ULONG DisplayID;
if (DisplayID = p96BestModeIDTags(P96BIDTAG_NominalWidth, w,
P96BIDTAG_NominalHeight, h,
P96BIDTAG_Depth, 24,
TAG_DONE)) {
//printf("Mode ID: %lx\n", DisplayID);
if (DisplayID != INVALID_ID) {
zz9k_screen = OpenScreenTags(NULL,
SA_Title,"ZZ9000 ARM Application",
SA_DisplayID, bmid,
SA_DisplayID, DisplayID,
SA_Depth, 24,
TAG_DONE);

/*printf("Planes[0]: %p\n", zz9k_screen->BitMap.Planes[0]);
printf("BytesPerRow: %d\n", zz9k_screen->BitMap.BytesPerRow);
printf("Rows: %d\n", zz9k_screen->BitMap.Rows);
printf("Depth: %d\n", zz9k_screen->BitMap.Depth);*/
/*printf("Planes[0]: %p\n", zz9k_screen->BitMap.Planes[0]);
printf("BytesPerRow: %d\n", zz9k_screen->BitMap.BytesPerRow);
printf("Rows: %d\n", zz9k_screen->BitMap.Rows);
printf("Depth: %d\n", zz9k_screen->BitMap.Depth);*/
}
}
}

__saveds struct InputEvent *input_handler(__reg("a0") struct InputEvent *ielist, __reg("a1") struct MsgPort *port) {
struct InputEvent *ie, *prev;


Loading…
Cancel
Save