VMU development: Difference between revisions

From dreamcast.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:


=== Hardware ===
=== Hardware ===
A high-level overview of the VMU's hardware and peripherals can be found [[VMU_hardware_overview|here]].
A high-level overview of the VMU's hardware and peripherals can be found [[VMU_hardware_overview|here]]. A good initial look at application-development for the device can be found [https://mc.pp.se/dc/vms/index.html at Marcus Comstedt's VMU Programming Site]. A combination of this site and the official [[:File:VMU.pdf VMU Development Manual]] is typically what is referenced while programming for the VMU.
 
=== Architecture ===


=== Programming ===
=== Programming ===
Line 13: Line 15:
==== C Code ====
==== C Code ====
Thanks to the uM23 emulator, it is now possible to indirectly write C code for the VMU. The code is cross-compiled for the ARM Cortex A23 target, and the resulting binary image is then loaded onto the VMU as a "DATA" file. The uM23 emulator, which must be loaded onto the device as the main "GAME" file, will then allow you to select an ARM binary image to run from its menu. More information can be found [https://dmitry.gr/?r=05.Projects&proj=25.%20VMU%20Hacking here].
Thanks to the uM23 emulator, it is now possible to indirectly write C code for the VMU. The code is cross-compiled for the ARM Cortex A23 target, and the resulting binary image is then loaded onto the VMU as a "DATA" file. The uM23 emulator, which must be loaded onto the device as the main "GAME" file, will then allow you to select an ARM binary image to run from its menu. More information can be found [https://dmitry.gr/?r=05.Projects&proj=25.%20VMU%20Hacking here].
=== Architecture ===


=== Testing ===
=== Testing ===
Line 20: Line 20:
The favored emulator for VMU development and testing is the ElysianVMU emulator, as it is cross-platform, is ranked top for features and accuracy, and is still actively developed. The emulator also has an explicit goal of offering a debugging environment to facilitate development. Much of the debugger is still under active development; however, just features like the RAM and flash memory explorer widgets can be of great use during development. More information can be found [[VMU Emulators#ElysianVMU|here]].
The favored emulator for VMU development and testing is the ElysianVMU emulator, as it is cross-platform, is ranked top for features and accuracy, and is still actively developed. The emulator also has an explicit goal of offering a debugging environment to facilitate development. Much of the debugger is still under active development; however, just features like the RAM and flash memory explorer widgets can be of great use during development. More information can be found [[VMU Emulators#ElysianVMU|here]].
==== Physical Device ====
==== Physical Device ====
Before publishing or distributing your game, it is highly recommended that you still test on physical hardware. There are various ways through which one can get a GAME file onto the actual device.  
Before publishing or distributing your game, it is highly recommended that you still test on physical hardware. There are various ways through which one can get a GAME file onto the actual device depending on your Dreamcast's configuration and peripherals.
* DreamShell
* VMU Tool
* Web Browser


=== References ===
=== References ===

Revision as of 22:26, 27 December 2022

Overview

Developing standalone games for the VMU is both a challenging and rewarding development feat. On one hand, it's not the easiest embedded device or to target, given that it doesn't have a C compiler and has its own set of hardware eccentricities. On the other hand, the device features a rich instruction set, 3 different clock sources, a FAT filesystem, and many different peripherals which can be leveraged by a developer, making it something of a Sega Saturn of little 8-bit gaming devices.

While there is an active and ongoing effort within the scene to lower the barrier of entry into VMU development and to get more high-quality tutorials and materials out there for newbies, this page will hopefully serve as an entry point based on what is currently available.

Hardware

A high-level overview of the VMU's hardware and peripherals can be found here. A good initial look at application-development for the device can be found at Marcus Comstedt's VMU Programming Site. A combination of this site and the official File:VMU.pdf VMU Development Manual is typically what is referenced while programming for the VMU.

Architecture

Programming

Since there is no C compiler for the VMU's 8-bit Sanyo CPU, development is traditionally done in Sanyo LC86k assembly language; however, it is now possible to write C code indirectly targeting the device via emulation of the ARM Cortex A23 CPU.

LC86k Assembly Code

The Waterbear assembler/disassembler is the favored tool for creating VMU binaries, as it is cross-platform, supports all undocumented opcodes and SFRs, and is still under active development. You can find it here.

C Code

Thanks to the uM23 emulator, it is now possible to indirectly write C code for the VMU. The code is cross-compiled for the ARM Cortex A23 target, and the resulting binary image is then loaded onto the VMU as a "DATA" file. The uM23 emulator, which must be loaded onto the device as the main "GAME" file, will then allow you to select an ARM binary image to run from its menu. More information can be found here.

Testing

Emulators

The favored emulator for VMU development and testing is the ElysianVMU emulator, as it is cross-platform, is ranked top for features and accuracy, and is still actively developed. The emulator also has an explicit goal of offering a debugging environment to facilitate development. Much of the debugger is still under active development; however, just features like the RAM and flash memory explorer widgets can be of great use during development. More information can be found here.

Physical Device

Before publishing or distributing your game, it is highly recommended that you still test on physical hardware. There are various ways through which one can get a GAME file onto the actual device depending on your Dreamcast's configuration and peripherals.

  • DreamShell
  • VMU Tool
  • Web Browser

References

Here are some reference resources to get started

This page is a stub page. It needs to be expanded with more detail. If you know more information about this topic, please sign up and contribute to dreamcast.wiki!