@@ -37,6 +37,7 @@ public sealed partial class DOSBox : WaterboxCore
37
37
private LibDOSBox _libDOSBox ;
38
38
private readonly List < IRomAsset > _romAssets ;
39
39
private readonly List < IDiscAsset > _discAssets ;
40
+ private const int _messageDuration = 4 ;
40
41
41
42
// Drive management variables
42
43
private List < IRomAsset > _floppyDiskImageFiles = new List < IRomAsset > ( ) ;
@@ -48,6 +49,7 @@ public sealed partial class DOSBox : WaterboxCore
48
49
private bool _disposed ;
49
50
50
51
private string GetFullName ( IRomAsset rom ) => Path . GetFileName ( rom . RomPath . SubstringAfter ( '|' ) ) ;
52
+ private string GetFullName ( IDiscAsset disk ) => Path . GetFileName ( disk . DiscData . Name . SubstringAfter ( '|' ) ) ;
51
53
52
54
// CD Handling logic
53
55
private List < string > _cdRomFileNames = new List < string > ( ) ;
@@ -82,7 +84,7 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
82
84
_floppyDiskImageFiles . Add ( file ) ;
83
85
break ;
84
86
85
- case ".bin " :
87
+ case ".hdd " :
86
88
_hardDiskImageFile = file ;
87
89
break ;
88
90
@@ -131,7 +133,7 @@ public DOSBox(CoreLoadParameters<object, SyncSettings> lp)
131
133
132
134
// Getting disc data structure
133
135
var CDDataStruct = GetCDDataStruct ( _discAssets [ discIdx ] . DiscData ) ;
134
- Console . WriteLine ( $ "[CD] Adding Disc { discIdx } : '{ _discAssets [ discIdx ] . DiscName } ' as '{ cdRomFileName } ' with sector count: { CDDataStruct . End } , track count: { CDDataStruct . Last } .") ;
136
+ Console . WriteLine ( $ "[CD] Adding Disc { discIdx } : '{ GetFullName ( _discAssets [ discIdx ] ) } ' as '{ cdRomFileName } ' with sector count: { CDDataStruct . End } , track count: { CDDataStruct . Last } .") ;
135
137
136
138
// Adding file name to list
137
139
_cdRomFileNames . Add ( cdRomFileName ) ;
@@ -451,20 +453,20 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
451
453
if ( ! _isPrevFloppyDiskPressed && controller . IsPressed ( Inputs . PrevFloppyDisk ) )
452
454
{
453
455
_currentFloppyDisk = _currentFloppyDisk == 0 ? _floppyDiskCount - 1 : _currentFloppyDisk - 1 ;
454
- CoreComm . Notify ( $ "Selected { FileNames . FD } { _currentFloppyDisk } : { Path . GetFileName ( _floppyDiskImageFiles [ _currentFloppyDisk ] . RomPath ) } ", null ) ;
456
+ CoreComm . Notify ( $ "Selected { FileNames . FD } { _currentFloppyDisk } : { GetFullName ( _floppyDiskImageFiles [ _currentFloppyDisk ] ) } ", _messageDuration ) ;
455
457
}
456
458
457
459
if ( ! _isNextFloppyDiskPressed && controller . IsPressed ( Inputs . NextFloppyDisk ) )
458
460
{
459
461
_currentFloppyDisk = ( _currentFloppyDisk + 1 ) % _floppyDiskCount ;
460
- CoreComm . Notify ( $ "Selected { FileNames . FD } { _currentFloppyDisk } : { Path . GetFileName ( _floppyDiskImageFiles [ _currentFloppyDisk ] . RomPath ) } ", null ) ;
462
+ CoreComm . Notify ( $ "Selected { FileNames . FD } { _currentFloppyDisk } : { GetFullName ( _floppyDiskImageFiles [ _currentFloppyDisk ] ) } ", _messageDuration ) ;
461
463
}
462
464
463
465
// Processing floppy disk swapping
464
466
if ( ! _isSwapFloppyDiskPressed && controller . IsPressed ( Inputs . SwapFloppyDisk ) )
465
467
{
466
468
fi . DriveActions . InsertFloppyDisk = _currentFloppyDisk ;
467
- CoreComm . Notify ( $ "Insterted { FileNames . FD } { _currentFloppyDisk } : { Path . GetFileName ( _floppyDiskImageFiles [ _currentFloppyDisk ] . RomPath ) } into drive A:", null ) ;
469
+ CoreComm . Notify ( $ "Insterted { FileNames . FD } { _currentFloppyDisk } : { GetFullName ( _floppyDiskImageFiles [ _currentFloppyDisk ] ) } into drive A:", _messageDuration ) ;
468
470
}
469
471
}
470
472
@@ -475,20 +477,20 @@ protected override LibWaterboxCore.FrameInfo FrameAdvancePrep(IController contro
475
477
if ( ! _isPrevCDROMPressed && controller . IsPressed ( Inputs . PrevCDROM ) )
476
478
{
477
479
_currentCDROM = _currentCDROM == 0 ? _cdRomFileNames . Count - 1 : _currentCDROM - 1 ;
478
- CoreComm . Notify ( $ "Selected { FileNames . CD } { _currentCDROM } : { _cdRomFileNames [ _currentCDROM ] } ", null ) ;
480
+ CoreComm . Notify ( $ "Selected { FileNames . CD } { _currentCDROM } : { GetFullName ( _discAssets [ _currentCDROM ] ) } ", _messageDuration ) ;
479
481
}
480
482
481
483
if ( ! _isNextCDROMPressed && controller . IsPressed ( Inputs . NextCDROM ) )
482
484
{
483
485
_currentCDROM = ( _currentCDROM + 1 ) % _cdRomFileNames . Count ;
484
- CoreComm . Notify ( $ "Selected { FileNames . CD } { _currentCDROM } : { _cdRomFileNames [ _currentCDROM ] } ", null ) ;
486
+ CoreComm . Notify ( $ "Selected { FileNames . CD } { _currentCDROM } : { GetFullName ( _discAssets [ _currentCDROM ] ) } ", _messageDuration ) ;
485
487
}
486
488
487
489
// Processing CDROM disk swapping
488
490
if ( ! _isSwapCDROMPressed && controller . IsPressed ( Inputs . SwapCDROM ) )
489
491
{
490
492
fi . DriveActions . InsertCDROM = _currentCDROM ;
491
- CoreComm . Notify ( $ "Insterted { FileNames . CD } { _currentCDROM } : { _cdRomFileNames [ _currentCDROM ] } into drive D:", null ) ;
493
+ CoreComm . Notify ( $ "Insterted { FileNames . CD } { _currentCDROM } : { GetFullName ( _discAssets [ _currentCDROM ] ) } into drive D:", _messageDuration ) ;
492
494
}
493
495
}
494
496
0 commit comments