Multiple Configuration Files ============================ MAME has a very powerful configuration file system that can allow you to tweak settings on a per-game, per-system, or even per-monitor type basis, but requires careful thought about how you arrange your configs. .. _advanced-multi-CFG: Order of Config Loading ----------------------- 1. The command line is parsed first, and any settings passed that way *will take priority over anything in an INI file*. 2. **MAME.INI** (or other platform INI; e.g. **MESS.INI**) is parsed twice. The first pass may change various path settings, so the second pass is done to see if there is a valid config file at that new location (and if so, change settings using that file) 3. **DEBUG.INI** if in debug mode. This is an advanced config file, most people won't need to use it or be concerned by it. 4. System-specific INI files where appropriate (e.g. **NEOGEO_NOSLOT.INI** or **CPS2.INI**) As an example, Street Fighter Alpha is a CPS2 game, and so **CPS2.INI** would be loaded here. 5. Monitor orientation INI file (either **HORIZONT.INI** or **VERTICAL.INI**) Pac-Man, for one example, is a vertical monitor setup, so it would load **VERTICAL.INI**. Street Fighter Alpha is a horizontal game, so it loads **HORIZONT.INI**. 6. System-type INI files (**ARCADE.INI**, **CONSOLE.INI**, **COMPUTER.INI**, or **OTHERSYS.INI**) Both Pac-Man and Street Fighter Alpha are arcade games, so **ARCADE.INI** would be loaded here. Atari 2600 would load **CONSOLE.INI**. 7. Screen-type INI file (**VECTOR.INI** for vector games, **RASTER.INI** for raster games, **LCD.INI** for LCD games) Pac-Man and Street Fighter Alpha are raster, so **RASTER.INI** gets loaded here. Tempest is a vector monitor game, and **VECTOR.INI** would be loaded here. 8. Source INI files. This is an advanced config file, most people won't need to use it and it can be safely ignored. MAME will attempt to load **SOURCE/SOURCEFILE.INI** and **SOURCEFILE.INI**, where sourcefile is the actual filename of the source code file. *mame -listsource * will show the source file for a given game. For instance, Banpresto's Sailor Moon, Atlus's Dodonpachi, and Nihon System's Dangun Feveron all share a large amount of hardware and are grouped into the CAVE.C file, meaning they all parse **source/cave.ini** 9. Parent INI file. For example, if running Pac-Man, which is a clone of Puck-Man, it'd be **PUCKMAN.INI** 10. Driver INI file. Using our previous example of Pac-Man, this would be **PACMAN.INI**. Examples of Config Loading Order -------------------------------- 1. Alcon, which is the US clone of Slap Fight. (*mame alcon*) Command line, MAME.INI, VERTICAL.INI, ARCADE.INI, RASTER.INI, SLAPFGHT.INI, and lastly ALCON.INI (*remember command line parameters take precedence over all else!*) 2. Super Street Fighter 2 Turbo (*mame ssf2t*) Command line, MAME.INI, HORIZONT.INI, ARCADE.INI, RASTER.INI, CPS2.INI, and lastly SSF2T.INI (*remember command line parameters take precedence over all else!*) Tricks to Make Life Easier -------------------------- Some users may have a wall-mounted or otherwise rotatable monitor, and may wish to actually play vertical games with the rotated display. The easiest way to accomplish this is to put your rotation modifiers into **VERTICAL.INI**, where they will only affect vertical games. [todo: more practical examples] mitdiffstatshomepage
path: root/src/lib/formats/ap_dsk35.h
blob: 8b3a8bbc1d3772df624d94d230c5071591639a3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// license:BSD-3-Clause
// copyright-holders:Nathan Woods, R. Belmont
/*********************************************************************

    ap_dsk35.h

    Apple 3.5" disk images

*********************************************************************/
#ifndef MAME_FORMATS_AP_DSK35_H
#define MAME_FORMATS_AP_DSK35_H

#pragma once

#include "flopimg.h"

void sony_filltrack(uint8_t *buffer, size_t buffer_len, size_t *pos, uint8_t data);
uint8_t sony_fetchtrack(const uint8_t *buffer, size_t buffer_len, size_t *pos);

int apple35_sectors_per_track(floppy_image_legacy *image, int track);

/**************************************************************************/

LEGACY_FLOPPY_OPTIONS_EXTERN(apple35_mac);
LEGACY_FLOPPY_OPTIONS_EXTERN(apple35_iigs);

class dc42_format : public floppy_image_format_t
{
public:
	dc42_format();

	virtual int identify(io_generic *io, uint32_t form_factor) override;
	virtual bool load(io_generic *io, uint32_t form_factor, floppy_image *image) override;
	virtual bool save(io_generic *io, floppy_image *image) override;

	virtual const char *name() const override;
	virtual const char *description() const override;
	virtual const char *extensions() const override;
	virtual bool supports_save() const override;

private:
	static const desc_e mac_gcr[];

	uint8_t gb(const uint8_t *buf, int ts, int &pos, int &wrap);
	void update_chk(const uint8_t *data, int size, uint32_t &chk);
};

extern const floppy_format_type FLOPPY_DC42_FORMAT;

#endif // MAME_FORMATS_AP_DSK35_H