summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2019-07-14 18:17:30 -0400
committer GitHub <noreply@github.com>2019-07-14 18:17:30 -0400
commite54d7aef2673a9323b733584d44edd80bc1cdd45 (patch)
treeefe9d7f42dc31e660fb30d4deb73b2c2fbb518d3
parent823ebb69b97c316d8484982cdaf13ab2e835cf48 (diff)
parent99e33d76683a1cd58149bf4b4f74b0df43d78f16 (diff)
Merge pull request #5346 from rzero9/patch-1
fmtowns.cpp: fix CDDA start/end position
-rw-r--r--src/mame/drivers/fmtowns.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index 98f089e485c..5d70f477ccd 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -224,7 +224,7 @@ inline uint32_t towns_state::msf_to_lbafm(uint32_t val) // because the CDROM co
f = bcd_to_byte(val & 0x0000ff);
s = (bcd_to_byte((val & 0x00ff00) >> 8));
m = (bcd_to_byte((val & 0xff0000) >> 16));
- return ((m * (60 * 75)) + (s * 75) + f);
+ return ((m * (60 * 75)) + (s * 75) + f) - 150;
}
void towns_state::init_serial_rom()
@@ -1481,13 +1481,7 @@ void towns_state::towns_cdrom_read(cdrom_image_device* device)
m_towns_cd.lba_current = msf_to_lbafm(lba1);
m_towns_cd.lba_last = msf_to_lbafm(lba2);
- // first track starts at 00:02:00 - this is hardcoded in the boot procedure
track = cdrom_get_track(device->get_cdrom_file(),m_towns_cd.lba_current);
- if(track < 2)
- { // recalculate LBA
- m_towns_cd.lba_current -= 150;
- m_towns_cd.lba_last -= 150;
- }
// parameter 7 = sector count?
// lemmings 2 sets this to 4 but hates 4 extra sectors being read