neo

package
v0.0.0-...-86cf518 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package neo implements the .neo file format used by the Terraonion NeoSD cartridge.

Index

Constants

View Source
const (
	P int = iota
	S
	M
	V1
	V2
	C
	Areas
)

These constants map to the ROM sections

View Source
const (
	// Extension is the conventional file extension used
	Extension = ".neo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Size         [Areas]uint32
	Year         uint32
	Genre        Genre
	Screenshot   uint32
	NGH          uint32
	Name         string
	Manufacturer string
	ROM          [Areas][]byte
	// contains filtered or unexported fields
}

File represents a .neo file. It is simply a header followed by six ROM sections

func NewFile

func NewFile(path string) (*File, error)

NewFile returns a File based on the passed zip file or directory containing Neo Geo ROM images. If the last element of the path stripped of any .extension matches a game known to MAME then it will use MAME logic to decode the ROM images otherwise it falls back to generic logic based solely on the filenames

func (*File) MarshalBinary

func (f *File) MarshalBinary() ([]byte, error)

MarshalBinary encodes the file into binary form and returns the result

func (*File) UnmarshalBinary

func (f *File) UnmarshalBinary(b []byte) error

UnmarshalBinary decodes the file from binary form

type Genre

type Genre uint32

Genre represents the game genre

const (
	Other Genre = iota
	Action
	BeatEmUp
	Sports
	Driving
	Platformer
	Mahjong
	Shooter
	Quiz
	Fighting
	Puzzle
)

These are the currently supported genres and map 1:1 with the NeoSD firmware

func (Genre) String

func (g Genre) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL