ARM application development SDK for MNT ZZ9000 graphics and coprocessor card for classic Amiga computers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests. 4.2 KiB

  1. # MNT ZZ9000 ARM SDK
  2. MNT ZZ9000 is a graphics and ARM coprocessor card for Amiga computers equipped with Zorro slots. It is based on a Xilinx ZYNQ Z-7020 chip that combines 7-series FPGA fabric with dual ARM Cortex-A9 CPUs clocked at 666MHz. The current version has 1GB of DDR3 RAM and no eMMC soldered.
  3. This repository contains some example programs and documentation that will help you to get started hacking on ARM software for the ZZ9000.
  4. The mechanism for launching and interacting with ARM programs from AmigaOS is still rudimentary at this point. We're grateful for any constructive feedback and pull requests that will help shape the system.
  5. # Requirements
  6. To build the example applications, you need a version of GCC called arm-none-eabi-gcc, which is available in major Linux distributions. We're exclusively developing on Linux (Debian, specifically) and don't support any other platforms at the moment. You're welcome to contribute build instructions for other platforms. It would be nice to have an ARM compiler/assembler for AmigaOS as well, so that you can develop on the target machine.
  7. # Building
  8. Every example application has a `` script that calls `arm-none-eabi-gcc` to build and statically link the application with a special linker file, `link.ld`. Every application is per default linked to run at address `0x03000000` and can access arbitrary memory. There is no memory protection or memory management, but you can link in the included `libmemory` for malloc/free as demonstrated by the nanojpeg example (you just give it a fixed memory block on startup).
  9. ZZ9000OS offers much less infrastructure to applications than traditional operating systems. Currently, only the following functions and arguments are provided by a structure called ZZ9K_ENV passed to your entry function:
  10. ```
  11. struct ZZ9K_ENV {
  12. uint32_t api_version;
  13. uint32_t argv[8];
  14. uint32_t argc;
  15. int (*putchar)(char);
  16. void (*set_output_putchar_to_events)(char);
  17. void (*set_output_events_blocking)(char);
  18. void (*put_event_code)(uint16_t);
  19. uint16_t (*get_event_serial)();
  20. uint16_t (*get_event_code)();
  21. char (*output_event_acked)();
  22. };
  23. ```
  24. # Loading
  25. In the `zz9k-loader` directory, you can find sources for the `zz9k` CLI tool that runs on AmigaOS (m68k). With `zz9k`, you can load an ARM application into the DDR3 memory of ZZ9000 and run it. The loader supports setting up multiple user interface modalities as a convenience:
  26. - `run` just jumps to your code with no user interface.
  27. - `-640x480` and `-320x240` set up a 640x480@32 or 320x240@32 Intuition screen. If you pass a `!screen` parameter to your application, it will be substituted for the screen's bitmap address for direct access. Pass `!width` as a parameter to get the screen's width in pixels.
  28. - `-keyboard` passes raw Amiga keyboard scan codes to the ARM application's event stream.
  29. - `-console` attaches stdin and stdout of the Shell to your application, demonstrated by the `shell` example.
  30. - `-audio` experimental mode that plays back an audio buffer your application creates until a mouse button is pressed, demonstrated by `minimp3`.
  31. # Launching Example Apps
  32. ## Conway
  33. ```
  34. zz9k load conway.bin
  35. zz9k run -320x240 !screen !width
  36. ```
  37. ## Vector
  38. ```
  39. zz9k load vector.bin
  40. zz9k run -320x240 !screen !width
  41. ```
  42. ## Raytrace
  43. ```
  44. zz9k load raytrace.bin
  45. zz9k run -320x240 !screen !width
  46. ```
  47. # Third Party Code
  48. The SDK contains a collection of third-party libraries/code for ARM bare metal applications:
  49. - Runtime ABI for Cortex-M0 (lib/div), by Jörg Mische <>
  50. - Tiny printf, sprintf, vsnprintf (lib/printf), by Marco Paland <>
  51. - libmemory memory allocator (lib/memory/libmemory_freelist.a), by Embedded Artistry, sources at:
  52. - memcpy, memset, memmove (lib/memory), Public Domain
  53. Portions of example code is lifted from the following sources:
  54. - "Conway's game of life", Rosetta Code,
  55. # License / Copyright
  56. If not stated otherwise in specific source code files, everything here is:
  57. Copyright (C) 2016-2019, Lukas F. Hartmann <>
  58. MNT Research GmbH, Berlin
  60. SPDX-License-Identifier: GPL-3.0-or-later