Abstracted away the machine bus'es and flags in order to make the rest of the emulator agnostic as to how they're stored.

This commit is contained in:
OBattler
2021-12-13 01:23:06 +01:00
parent 6fd2cfaf90
commit 6661ff5dcc
15 changed files with 82 additions and 57 deletions

View File

@@ -979,6 +979,27 @@ machine_get_nvrmask(int m)
}
int
machine_has_flags(int m, int flags)
{
return(machines[m].flags & flags);
}
int
machine_has_bus(int m, int bus_flags)
{
return(machines[m].flags & bus_flags);
}
int
machine_has_cartridge(int m)
{
return(machine_has_flags(m, MACHINE_CARTRIDGE) ? 1 : 0);
}
int
machine_get_machine_from_internal_name(char *s)
{