trapexit / 3do-devkit

A new development environment for the 3DO Opera game console
https://3dodev.com
27 stars 2 forks source link
game-development retro

This is a 3DO Opera (M1) development environment. It is built from a number of components both new and old. The hope is that by making setup more turnkey and bringing documentation and examples into one location it will help facilitate more homebrew on the 3DO.

Components

Compilers

Libraries

Documentation

Tooling

trapexit's tooling may not always be fully up to date in this repo so double check by visiting the links provided above.

Examples

Misc

Usage

Linux

Make sure you have WINE installed. Some tools are currently only available on Windows.

makefile

Windows

We need project files for common Windows IDEs.

WSL2

Same as Linux

Media Conversion

images

3it is a pretty comprehensive tool supporting conversion to and from CELs, IMAGs, Banners, etc. Older tools are included for completeness but should not be needed.

audio

ffmpeg can be used to convert files to AIFF files but to compress them you will need to use the original software for now. See below.

SDX2 encoding is not currently supported by ffmpeg but work is being done to build an encoder.

uncompressed AIFF signed 16bit bigendian

ffmpeg -i input.file -ar 22050 -c:a pcm_s16be output.aiff"

uncompressed AIFF signed 8bit

ffmpeg -i input.file -ar 22050 -c:a pcm_s8 output.aiff"

uncompressed raw signed 16bit bigendian

ffmpeg -i input.file -ar 22050 -f s16be -acodec pcm_s16be output.raw"

uncompressed raw signed 8bit

ffmpeg -i input.file -ar 22050 -f s8 -acodec pcm_s8 output.raw"

compressed 4bit ADPCM IMA WS

Make sure you have a more recent version of ffmpeg to use adpcm_ima_ws

ffmpeg -i input.file -c:a adpcm_ima_ws output.aifc

video

Same as audio. Cinepak creation by ffmpeg is not compatible with the 3DO provided decoder. https://3dodev.com has a tutorial.

http://3dodev.com/software/sdks#prebuilt_qemu_macos_9_vm

Notes

ARM C++ 1.11 compiler

Memory Management

ARM C++ 1.11 treats POD (plain old data) and objects differently so POD must be expressly handled/ignored when worrying about object destruction. There are no default destructors for objects either meaning it is not possible to simulate a 'placement delete' to force destruction. obj->~OBJ() will not work unless expressly defined. As a result it is difficult to write generic template based data types. To work around this the STL like library provided removed memory freeing from 'delete' to force its use as a placement delete. Meaning that when wanting to free data from 'new' one should use memory_delete(ptr). That said best to use or create higher level objects to manage such things. Simple versions of shared_ptr and unique_ptr are provided.

There might be a better solution to this problem but after many attempts, including attempting to use the strategy by RogueWave which didn't seem to work, this was settled on till something better could be be done.

TODO

Thanks

Links

Donations / Sponsorship

If you find 3do-devkit useful please consider supporting its ongoing development.

https://github.com/trapexit/support