Skip to content

Commit

Permalink
Fixes screen orientation for Pac-Mania after \#691 implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jotego committed Aug 5, 2024
1 parent 9dba49e commit f548a46
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 5 deletions.
29 changes: 29 additions & 0 deletions cores/riders/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# JTRIDERS FPGA core Compatible with Konami's Sunset Riders hardware

By Jose Tejada (@topapate)

You can show your appreciation through
* [Patreon](https://patreon.com/jotego)
* [Paypal](https://paypal.me/topapate)
* [Github](https://github.com/sponsors/jotego)

Project source code hosted at http://www.github.com/jotego/jtcores
License: GPL3, you are obligued to publish your code if you use mine

Yes, you always wanted to have an arcade board at home. First you couldn't get it because your parents somehow did not understand you. Then you grow up and your wife doesn't understand you either. Don't worry, JT cores are here to the rescue.

I hope you will have as much fun with this project as I had while working on it!

# Supported Systems

This FPGA core is compatible with the following arcade PCBs:

- Sunset Riders
- TMNT Turtles in Time
- X-Men (not on MiST devices)

Due to limitations in the internal RAM memory of small FPGA devices, X-Men will not run on MiST FPGAs.

# Game Configuration

This game does not use DIP switches but a small EEPROM to save the configuration. Access to the configuration by pressing F2 on your keyboard or pressing button 1 and coin in the Analogue Pocket. Follow the game menu to alter the configuration from that point on.
9 changes: 8 additions & 1 deletion cores/riders/cfg/macros.def
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ JTFRAME_WIDTH=304
JTFRAME_HEIGHT=224

# default EEPROM needed to prevent game from booting upside down with error
JTFRAME_IOCTL_RD=128
JTFRAME_IOCTL_RD=128

# 13 bits needed for X-Men
SND_RAMW=13

# But MiST/SiDi cannot handle that much
[mist|sidi]
SND_RAMW=11
3 changes: 3 additions & 0 deletions modules/jtframe/doc/jtframe-mra.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ debugging in MiST without affecting the MRA generation.
TOML elements (see full reference in mame2mra.go)

```
[global]
Orientation={ Fixed=true } # use when rotation CW/CCW information from MAME is not reliable
[parse]
sourcefile=[ "mamefile1.cpp", "mamefile2.cpp"... ]
skip.Setnames=["willskip1","willskip2"]
Expand Down
7 changes: 3 additions & 4 deletions modules/jtframe/src/jtframe/mra/core_mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ func coreMOD_dial(machine *MachineXML, cfg Mame2MRA, coremod *int) {
}
}

func coreMOD_rotate(machine *MachineXML, coremod *int) bool {
func coreMOD_rotate(machine *MachineXML, fixed bool, coremod *int) bool {
if machine.Display.Rotate!=0 && machine.Display.Rotate!=180 {
*coremod |= 1
if machine.Display.Rotate != 90 {
if machine.Display.Rotate != 90 && !fixed {
*coremod |= 4
}
return true
Expand All @@ -77,8 +77,7 @@ func coreMOD_audio(machine *MachineXML, cfg Mame2MRA, coremod *int) {

func make_coreMOD(root *XMLNode, machine *MachineXML, cfg Mame2MRA, macros map[string]string) int {
coremod := 0
vertical := coreMOD_rotate(machine, &coremod)
coreMOD_rotate(machine, &coremod)
vertical := coreMOD_rotate(machine, cfg.Global.Orientation.Fixed, &coremod)
coreMOD_dial(machine, cfg, &coremod)
wdiff, hdiff := coreMOD_screenSize(machine, cfg, macros, &coremod)
coreMOD_audio(machine, cfg, &coremod)
Expand Down
3 changes: 3 additions & 0 deletions modules/jtframe/src/jtframe/mra/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ type Mame2MRA struct {
Zip struct {
Alt string
}
Orientation struct {
Fixed bool
}
Overrule []Overrule_t // overrules values in MAME XML
}

Expand Down

0 comments on commit f548a46

Please sign in to comment.