@@ -245,12 +245,14 @@ bool AtariEmulator::initializeWithDisplayConfig(bool basicEnabled, const QString
245245 argList << " -nosound" ;
246246 }
247247
248- qDebug () << " Altirra OS enabled:" << m_altirraOSEnabled;
249- qDebug () << " Altirra BASIC enabled:" << m_altirraBASICEnabled;
248+ qDebug () << " [ROM CONFIG] Altirra OS enabled:" << m_altirraOSEnabled;
249+ qDebug () << " [ROM CONFIG] Altirra BASIC enabled:" << m_altirraBASICEnabled;
250+ qDebug () << " [ROM CONFIG] OS ROM path:" << (m_osRomPath.isEmpty () ? " (not set)" : m_osRomPath);
251+ qDebug () << " [ROM CONFIG] BASIC ROM path:" << (m_basicRomPath.isEmpty () ? " (not set)" : m_basicRomPath);
250252
251253 // Configure OS ROM (Altirra or External)
252254 if (m_altirraOSEnabled) {
253- qDebug () << " Using built-in Altirra OS ROM" ;
255+ qDebug () << " [ROM LOAD] Using built-in Altirra OS ROM" ;
254256 if (machineType == " -5200" ) {
255257 argList << " -5200-rev" << " altirra" ;
256258 } else if (machineType == " -atari" ) {
@@ -259,33 +261,47 @@ bool AtariEmulator::initializeWithDisplayConfig(bool basicEnabled, const QString
259261 argList << " -xl-rev" << " altirra" ;
260262 }
261263 } else {
262- qDebug () << " Using external OS ROM from user settings" ;
264+ qDebug () << " [ROM LOAD] Attempting to use external OS ROM from user settings" ;
263265 // Only add ROM paths if they are specified in settings
264266 if (!m_osRomPath.isEmpty ()) {
265267 if (machineType == " -5200" ) {
268+ qDebug () << " [ROM LOAD] Loading 5200 OS ROM from:" << m_osRomPath;
266269 argList << " -5200_rom" << m_osRomPath;
267270 } else if (machineType == " -atari" ) {
271+ qDebug () << " [ROM LOAD] Loading 800 OS-B ROM from:" << m_osRomPath;
268272 argList << " -osb_rom" << m_osRomPath; // 800 OS-B ROM
269273 } else {
270274 // For XL/XE machines
275+ qDebug () << " [ROM LOAD] Loading XL/XE OS ROM from:" << m_osRomPath;
271276 argList << " -xlxe_rom" << m_osRomPath;
272277 }
273278 } else {
274- qDebug () << " Warning: No OS ROM path specified, emulator may not start properly" ;
279+ qDebug () << " [ROM LOAD WARNING] No OS ROM path specified, falling back to Altirra OS" ;
280+ // Fallback to Altirra OS if no external ROM is specified
281+ qDebug () << " [ROM LOAD] Falling back to built-in Altirra OS ROM" ;
282+ if (machineType == " -5200" ) {
283+ argList << " -5200-rev" << " altirra" ;
284+ } else if (machineType == " -atari" ) {
285+ argList << " -800-rev" << " altirra" ;
286+ } else {
287+ argList << " -xl-rev" << " altirra" ;
288+ }
275289 }
276290 }
277291
278292 // Configure BASIC ROM (Altirra, External, or None)
279293 if (basicEnabled) {
280294 if (m_altirraBASICEnabled) {
281- qDebug () << " Using built-in Altirra BASIC ROM" ;
295+ qDebug () << " [ROM LOAD] Using built-in Altirra BASIC ROM" ;
282296 argList << " -basic-rev" << " altirra" ;
283297 } else {
284- qDebug () << " Using external BASIC ROM" ;
298+ qDebug () << " [ROM LOAD] Attempting to use external BASIC ROM" ;
285299 if (!m_basicRomPath.isEmpty ()) {
300+ qDebug () << " [ROM LOAD] Loading BASIC ROM from:" << m_basicRomPath;
286301 argList << " -basic_rom" << m_basicRomPath;
287302 } else {
288- qDebug () << " Warning: No BASIC ROM path specified" ;
303+ qDebug () << " [ROM LOAD WARNING] No BASIC ROM path specified, falling back to Altirra BASIC" ;
304+ argList << " -basic-rev" << " altirra" ;
289305 }
290306 }
291307 argList << " -basic" ; // Actually enable BASIC mode
@@ -416,11 +432,11 @@ bool AtariEmulator::initializeWithInputConfig(bool basicEnabled, const QString&
416432
417433 // Configure OS ROM (Altirra or External)
418434 if (m_altirraOSEnabled) {
419- qDebug () << " Using built-in Altirra OS ROM" ;
435+ qDebug () << " [ROM LOAD] Using built-in Altirra OS ROM" ;
420436 // Use built-in Altirra OS for all machine types
421437 argList << " -xl-rev" << " altirra" ;
422438 } else {
423- qDebug () << " Using external OS ROM from user settings" ;
439+ qDebug () << " [ROM LOAD] Attempting to use external OS ROM from user settings" ;
424440 if (!m_osRomPath.isEmpty ()) {
425441 // Use the correct parameter based on machine type
426442 if (machineType == " -5200" ) {
@@ -433,21 +449,32 @@ bool AtariEmulator::initializeWithInputConfig(bool basicEnabled, const QString&
433449 }
434450 qDebug () << " Adding OS ROM path:" << m_osRomPath;
435451 } else {
436- qDebug () << " Warning: No OS ROM path specified, emulator may not start properly" ;
452+ qDebug () << " [ROM LOAD WARNING] No OS ROM path specified, falling back to Altirra OS" ;
453+ // Fallback to Altirra OS if no external ROM is specified
454+ qDebug () << " [ROM LOAD] Falling back to built-in Altirra OS ROM" ;
455+ if (machineType == " -5200" ) {
456+ argList << " -5200-rev" << " altirra" ;
457+ } else if (machineType == " -atari" ) {
458+ argList << " -800-rev" << " altirra" ;
459+ } else {
460+ argList << " -xl-rev" << " altirra" ;
461+ }
437462 }
438463 }
439464
440465 // Configure BASIC ROM (Altirra, External, or None)
441466 if (basicEnabled) {
442467 if (m_altirraBASICEnabled) {
443- qDebug () << " Using built-in Altirra BASIC ROM" ;
468+ qDebug () << " [ROM LOAD] Using built-in Altirra BASIC ROM" ;
444469 argList << " -basic-rev" << " altirra" ;
445470 } else {
446- qDebug () << " Using external BASIC ROM" ;
471+ qDebug () << " [ROM LOAD] Attempting to use external BASIC ROM" ;
447472 if (!m_basicRomPath.isEmpty ()) {
473+ qDebug () << " [ROM LOAD] Loading BASIC ROM from:" << m_basicRomPath;
448474 argList << " -basic_rom" << m_basicRomPath;
449475 } else {
450- qDebug () << " Warning: No BASIC ROM path specified" ;
476+ qDebug () << " [ROM LOAD WARNING] No BASIC ROM path specified, falling back to Altirra BASIC" ;
477+ argList << " -basic-rev" << " altirra" ;
451478 }
452479 }
453480 argList << " -basic" ; // Actually enable BASIC mode
0 commit comments