663
659
out.putString(name());
665
661
// Indicates which bank is currently active
666
out.putInt(myCurrentBank);
662
out.putShort(myCurrentBank);
668
664
// The top registers for the data fetchers
670
for(i = 0; i < 8; ++i)
671
out.putByte((char)myTops[i]);
665
out.putByteArray(myTops, 8);
673
667
// The bottom registers for the data fetchers
675
for(i = 0; i < 8; ++i)
676
out.putByte((char)myBottoms[i]);
668
out.putByteArray(myBottoms, 8);
678
670
// The counter registers for the data fetchers
680
for(i = 0; i < 8; ++i)
681
out.putInt(myCounters[i]);
671
out.putShortArray(myCounters, 8);
683
673
// The counter registers for the fractional data fetchers
685
for(i = 0; i < 8; ++i)
686
out.putInt(myFractionalCounters[i]);
674
out.putIntArray(myFractionalCounters, 8);
688
676
// The fractional registers for the data fetchers
690
for(i = 0; i < 8; ++i)
691
out.putByte((char)myFractionalIncrements[i]);
677
out.putByteArray(myFractionalIncrements, 8);
693
679
// The Fast Fetcher Enabled flag
694
680
out.putBool(myFastFetch);
695
681
out.putBool(myLDAimmediate);
697
683
// Control Byte to update
699
for(i = 0; i < 8; ++i)
700
out.putByte((char)myParameter[i]);
684
out.putByteArray(myParameter, 8);
702
686
// The music counters
704
for(i = 0; i < 3; ++i)
705
out.putInt(myMusicCounters[i]);
687
out.putIntArray(myMusicCounters, 3);
707
689
// The music frequencies
709
for(i = 0; i < 3; ++i)
710
out.putInt(myMusicFrequencies[i]);
690
out.putIntArray(myMusicFrequencies, 3);
712
692
// The music waveforms
714
for(i = 0; i < 3; ++i)
715
out.putInt(myMusicWaveforms[i]);
693
out.putShortArray(myMusicWaveforms, 3);
717
695
// The random number generator register
718
696
out.putInt(myRandomNumber);
737
715
if(in.getString() != name())
742
718
// Indicates which bank is currently active
743
myCurrentBank = (uInt16) in.getInt();
719
myCurrentBank = in.getShort();
745
721
// The top registers for the data fetchers
746
limit = (uInt32) in.getInt();
747
for(i = 0; i < limit; ++i)
748
myTops[i] = (uInt8) in.getByte();
722
in.getByteArray(myTops, 8);
750
724
// The bottom registers for the data fetchers
751
limit = (uInt32) in.getInt();
752
for(i = 0; i < limit; ++i)
753
myBottoms[i] = (uInt8) in.getByte();
725
in.getByteArray(myBottoms, 8);
755
727
// The counter registers for the data fetchers
756
limit = (uInt32) in.getInt();
757
for(i = 0; i < limit; ++i)
758
myCounters[i] = (uInt16) in.getInt();
728
in.getShortArray(myCounters, 8);
760
730
// The counter registers for the fractional data fetchers
761
limit = (uInt32) in.getInt();
762
for(i = 0; i < limit; ++i)
763
myFractionalCounters[i] = (uInt32) in.getInt();
731
in.getIntArray(myFractionalCounters, 8);
765
733
// The fractional registers for the data fetchers
766
limit = (uInt32) in.getInt();
767
for(i = 0; i < limit; ++i)
768
myFractionalIncrements[i] = (uInt8) in.getByte();
734
in.getByteArray(myFractionalIncrements, 8);
770
736
// The Fast Fetcher Enabled flag
771
737
myFastFetch = in.getBool();
772
738
myLDAimmediate = in.getBool();
774
740
// Control Byte to update
775
limit = (uInt32) in.getInt();
776
for(i = 0; i < limit; ++i)
777
myParameter[i] = (uInt8) in.getByte();
741
in.getByteArray(myParameter, 8);
779
743
// The music mode counters for the data fetchers
780
limit = (uInt32) in.getInt();
781
for(i = 0; i < limit; ++i)
782
myMusicCounters[i] = (uInt32) in.getInt();
744
in.getIntArray(myMusicCounters, 3);
784
746
// The music mode frequency addends for the data fetchers
785
limit = (uInt32) in.getInt();
786
for(i = 0; i < limit; ++i)
787
myMusicFrequencies[i] = (uInt32) in.getInt();
747
in.getIntArray(myMusicFrequencies, 3);
789
749
// The music waveforms
790
limit = (uInt32) in.getInt();
791
for(i = 0; i < limit; ++i)
792
myMusicWaveforms[i] = (uInt16) in.getInt();
750
in.getShortArray(myMusicWaveforms, 3);
794
752
// The random number generator register
795
myRandomNumber = (uInt32) in.getInt();
753
myRandomNumber = in.getInt();
797
755
// Get system cycles and fractional clocks
798
mySystemCycles = in.getInt();
756
mySystemCycles = (Int32)in.getInt();
799
757
myFractionalClocks = (double)in.getInt() / 100000000.0;
801
catch(const char* msg)
803
cerr << "ERROR: CartridgeDPCPlus::load" << endl << " " << msg << endl;
761
cerr << "ERROR: CartridgeDPCPlus::load" << endl;