Skip to content

Commit

Permalink
***** JKCEMU Version 0.9.8.2 vom 03.01.2022 *****
Browse files Browse the repository at this point in the history
    * HC900, KC85/2..5:
        o D004-ROM auf Version 3.5 aktualisiert
        o D008-ROM auf Version 3.5 aktualisiert
    * KC85/5: CAOS 4.8 auf Patch 2 aktualisiert
    * Bugfixes:
        o Wenn ein Profil bei geöffnetem Schachbrettfenster gespeichert
          wurde, hatte später beim Laden des Profils und anschließendem
          Öffnen des Schachbrettfensters dieses keinen Inhalt.
        o Datei-Browser: Das Löschen einer Datei war mitunter nicht möglich,
          da sie durch die Detailansicht gesperrt war. Nun wird beim Aufruf
          des Menüpunktes zum Löschen einer Datei die Detailansicht geleert,
          um eine evtl. Sperre zu lösen.
        o KC85/2..5: Der D008-ROM wurde auch in Adressbereichen eingeblendet,
          wo er nicht eingeblendet sein durfte.
        o Z80CPU: Wenn die Interrupt-Quellen auf null gesetzt wurden, trat
          eine NullPointerException auf.

Originated-by: jkcemu-src-0.9.8.2.zip
Originated-md5: 9714e5f460068cba0c44ef42fd23bda8
Originated-URL: http://www.jens-mueller.org/jkcemu/download/jkcemu-src-0.9.8.2.zip

Signed-off-by: Stephan Linz <[email protected]>
  • Loading branch information
Jens Müller authored and rexut committed Jan 3, 2022
1 parent ee5003d commit ff303fe
Show file tree
Hide file tree
Showing 19 changed files with 170 additions and 112 deletions.
6 changes: 3 additions & 3 deletions src/jkcemu/Main.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) 2008-2021 Jens Mueller
* (c) 2008-2022 Jens Mueller
*
* Kleincomputer-Emulator
*
Expand Down Expand Up @@ -65,9 +65,9 @@
public class Main
{
public static final String APPNAME = "JKCEMU";
public static final String VERSION = "0.9.8.1";
public static final String VERSION = "0.9.8.2";
public static final String APPINFO = APPNAME + " Version " + VERSION;
public static final String COPYRIGHT = "(c) 2008-2021 Jens M\u00FCller";
public static final String COPYRIGHT = "(c) 2008-2022 Jens M\u00FCller";

public static final String FILE_GROUP_AUDIO = "audio";
public static final String FILE_GROUP_DEBUG_BREAK = "debug.breakpoints";
Expand Down
35 changes: 22 additions & 13 deletions src/jkcemu/audio/AudioFrm.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ public static AudioFrm open( ScreenFrm screenFrm )

public void openFile( File file, byte[] fileBytes, int offs )
{
this.tabTapeIn.openFile( file, fileBytes, offs );
int idx = this.tabbedPane.indexOfComponent( this.tabTapeIn );
if( idx >= 0 ) {
fireSelectTab( idx );
this.tabTapeIn.openFile( file, fileBytes, offs );
}
}


Expand Down Expand Up @@ -358,18 +362,7 @@ public void resetFired( EmuSys newEmuSys, Properties newProps )
// Fenstergroesse anpassen oder Fenster schliessen
if( nTabs > 0 ) {
pack();
if( idxToSelect >= 0 ) {
final int idx = idxToSelect;
EventQueue.invokeLater(
new Runnable()
{
@Override
public void run()
{
selectTab( idx );
}
} );
}
fireSelectTab( idxToSelect );
} else {
doClose();
}
Expand Down Expand Up @@ -408,6 +401,22 @@ private void enableAudio(
}


private void fireSelectTab( final int idx )
{
if( idx >= 0 ) {
EventQueue.invokeLater(
new Runnable()
{
@Override
public void run()
{
selectTab( idx );
}
} );
}
}


private void selectTab( int idx )
{
if( (idx >= 0) && (idx < this.tabbedPane.getTabCount()) ) {
Expand Down
32 changes: 20 additions & 12 deletions src/jkcemu/audio/TapeInFld.java
Original file line number Diff line number Diff line change
Expand Up @@ -403,21 +403,27 @@ public boolean checkEnableAudio( Properties props )
public void openFile( File file, byte[] fileBytes, int offs )
{
if( (file != null) || (fileBytes != null) ) {
EmuSys emuSys = this.emuThread.getEmuSys();
if( (emuSys != null) && (getTapeIn() == null) ) {
if( emuSys.supportsTapeIn() ) {
int speedKHz = this.audioFrm.getAndCheckSpeed();
if( speedKHz > 0 ) {
this.rbFromFile.setSelected( true );
try {
try {
if( getTapeIn() != null ) {
throw new IOException( "Die Audiofunktion \'Eingang Kassette\'"
+ " ist bereits aktiv.\n"
+ "Diese m\u00FCssen Sie zuerst deaktivieren,\n"
+ "bevor Sie eine neue Datei \u00F6ffnen k\u00F6nnen." );
}
EmuSys emuSys = this.emuThread.getEmuSys();
if( emuSys != null ) {
if( emuSys.supportsTapeIn() ) {
int speedKHz = this.audioFrm.getAndCheckSpeed();
if( speedKHz > 0 ) {
this.rbFromFile.setSelected( true );
enableFile( speedKHz, file, fileBytes, offs );
}
catch( IOException ex ) {
BaseDlg.showErrorDlg( this, ex );
}
}
}
}
catch( IOException ex ) {
BaseDlg.showErrorDlg( this, ex );
}
}
}

Expand Down Expand Up @@ -748,12 +754,13 @@ public void updFieldsEnabled()
boolean pause = false;
boolean progress = false;
String formatText = null;
AudioIn audioIn = null;
File file = this.fldFile.getFile();
EmuSys emuSys = this.emuThread.getEmuSys();
if( emuSys != null ) {
audioIn = emuSys.getTapeIn();
supported = emuSys.supportsTapeIn();
}
AudioIn audioIn = getTapeIn();
if( audioIn != null ) {
running = true;
fromLine = (audioIn instanceof AudioInLine);
Expand Down Expand Up @@ -928,7 +935,8 @@ private boolean enableLine() throws IOException

private AudioIn getTapeIn()
{
return emuThread.getEmuSys().getTapeIn();
EmuSys emuSys = this.emuThread.getEmuSys();
return emuSys != null ? emuSys.getTapeIn() : null;
}


Expand Down
3 changes: 1 addition & 2 deletions src/jkcemu/base/TabTitleFld.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) 2019-2020 Jens Mueller
* (c) 2019-2022 Jens Mueller
*
* Kleincomputer-Emulator
*
Expand All @@ -15,7 +15,6 @@
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
Expand Down
4 changes: 2 additions & 2 deletions src/jkcemu/emusys/KC85.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) 2008-2021 Jens Mueller
* (c) 2008-2022 Jens Mueller
*
* Kleincomputer-Emulator
*
Expand Down Expand Up @@ -128,7 +128,7 @@ public class KC85 extends EmuSys implements
public static final String VALUE_D004 = "D004";
public static final String VALUE_D008 = "D008";
public static final String VALUE_ROM_20 = "2.0";
public static final String VALUE_ROM_33 = "3.3";
public static final String VALUE_ROM_35 = "3.5";

public static final boolean DEFAULT_SWAP_KEY_CHAR_CASE = true;
public static final int DEFAULT_PROMPT_AFTER_RESET_MILLIS_MAX_2 = 5000;
Expand Down
50 changes: 28 additions & 22 deletions src/jkcemu/emusys/kc85/D004.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) 2009-2021 Jens Mueller
* (c) 2009-2022 Jens Mueller
*
* Kleincomputer-Emulator
*
Expand Down Expand Up @@ -30,9 +30,9 @@ public class D004 extends AbstractKC85Module

private static final String TEXT_D004_ROM_FILE = "D004-ROM-Datei";

private static byte[] romD004_20 = null;
private static byte[] romD004_331_2 = null;
private static byte[] romD004_331_4 = null;
private static byte[] romD004_20 = null;
private static byte[] romD004_35_2 = null;
private static byte[] romD004_35_4 = null;

private volatile boolean connected;
private boolean cpuEnableValue;
Expand Down Expand Up @@ -175,15 +175,15 @@ protected byte[] loadROM( KC85 kc85 )
if( romBytes == null ) {
if( this.romProp.equals( KC85.VALUE_ROM_20 ) ) {
romBytes = getROMBytes20();
} else if( this.romProp.equals( KC85.VALUE_ROM_33 ) ) {
} else if( this.romProp.equals( KC85.VALUE_ROM_35 ) ) {
if( kc85.getKCTypeNum() >= 4 ) {
romBytes = getROMBytes331_4();
romBytes = getROMBytes35_4();
} else {
romBytes = getROMBytes331_2();
romBytes = getROMBytes35_2();
}
} else {
if( kc85.getKCTypeNum() >= 4 ) {
romBytes = getROMBytes331_4();
romBytes = getROMBytes35_4();
} else {
romBytes = getROMBytes20();
}
Expand Down Expand Up @@ -247,10 +247,16 @@ public int getTypeByte()
public int readMemByte( int addr )
{
int rv = -1;
if( this.enabled && (this.romBytes != null) ) {
int idx = addr - this.romAddr;
if( (idx >= 0) && (idx < this.romBytes.length) ) {
rv = (int) this.romBytes[ idx ] & 0xFF;
if( this.enabled
&& (addr >= this.romAddr)
&& (addr < (this.romAddr + 0x2000)) )
{
rv = 0xFF;
if( this.romBytes != null ) {
int idx = addr - this.romAddr;
if( (idx >= 0) && (idx < this.romBytes.length) ) {
rv = (int) this.romBytes[ idx ] & 0xFF;
}
}
}
return rv;
Expand Down Expand Up @@ -389,24 +395,24 @@ private byte[] getROMBytes20()
}


private byte[] getROMBytes331_2()
private byte[] getROMBytes35_2()
{
if( romD004_331_2 == null ) {
romD004_331_2 = EmuUtil.readResource(
if( romD004_35_2 == null ) {
romD004_35_2 = EmuUtil.readResource(
this.kc85.getScreenFrm(),
"/rom/kc85/d004_331_2.bin" );
"/rom/kc85/d004_35_2.bin" );
}
return romD004_331_2;
return romD004_35_2;
}


private byte[] getROMBytes331_4()
private byte[] getROMBytes35_4()
{
if( romD004_331_4 == null ) {
romD004_331_4 = EmuUtil.readResource(
if( romD004_35_4 == null ) {
romD004_35_4 = EmuUtil.readResource(
this.kc85.getScreenFrm(),
"/rom/kc85/d004_331_4.bin" );
"/rom/kc85/d004_35_4.bin" );
}
return romD004_331_4;
return romD004_35_4;
}
}
16 changes: 11 additions & 5 deletions src/jkcemu/emusys/kc85/D008.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) 2018-2021 Jens Mueller
* (c) 2018-2022 Jens Mueller
*
* Kleincomputer-Emulator
*
Expand Down Expand Up @@ -132,10 +132,16 @@ protected byte[] loadROM( KC85 kc85 )
public int readMemByte( int addr )
{
int rv = -1;
if( this.enabled && (this.romBytes != null) ) {
int idx = (this.romBank * 0x2000) + addr - this.romAddr;
if( (idx >= 0) && (idx < this.romBytes.length) ) {
rv = (int) this.romBytes[ idx ] & 0xFF;
if( this.enabled
&& (addr >= this.romAddr)
&& (addr < (this.romAddr + 0x2000)) )
{
rv = 0xFF;
if( this.romBytes != null ) {
int idx = (this.romBank * 0x2000) + addr - this.romAddr;
if( (idx >= 0) && (idx < this.romBytes.length) ) {
rv = (int) this.romBytes[ idx ] & 0xFF;
}
}
}
return rv;
Expand Down
26 changes: 13 additions & 13 deletions src/jkcemu/emusys/kc85/KC85SettingsFld.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) 2010-2021 Jens Mueller
* (c) 2010-2022 Jens Mueller
*
* Kleincomputer-Emulator
*
Expand Down Expand Up @@ -186,7 +186,7 @@ public class KC85SettingsFld
private JButton btnModuleDown;
private JRadioButton rbDiskStationNone;
private JRadioButton rbDiskStationD004_20;
private JRadioButton rbDiskStationD004_33;
private JRadioButton rbDiskStationD004_35;
private JRadioButton rbDiskStationD008;
private JLabel labelDiskStationRom;
private JLabel labelDiskStationSpeed;
Expand Down Expand Up @@ -403,14 +403,14 @@ public KC85SettingsFld(
gbcDiskStation.gridy++;
this.tabDiskStation.add( this.rbDiskStationD004_20, gbcDiskStation );

this.rbDiskStationD004_33 = GUIFactory.createRadioButton(
"Floppy-Disk-Erweiterung D004 mit ROM-Version 3.31"
this.rbDiskStationD004_35 = GUIFactory.createRadioButton(
"Floppy-Disk-Erweiterung D004 mit ROM-Version 3.5"
+ " (optional mit GIDE)" );
grpDiskStation.add( this.rbDiskStationD004_33 );
this.rbDiskStationD004_33.addActionListener( this );
grpDiskStation.add( this.rbDiskStationD004_35 );
this.rbDiskStationD004_35.addActionListener( this );
gbcDiskStation.insets.top = 0;
gbcDiskStation.gridy++;
this.tabDiskStation.add( this.rbDiskStationD004_33, gbcDiskStation );
this.tabDiskStation.add( this.rbDiskStationD004_35, gbcDiskStation );

this.rbDiskStationD008 = GUIFactory.createRadioButton(
"Floppy-Disk-Erweiterung D008 (immer mit GIDE)" );
Expand Down Expand Up @@ -806,9 +806,9 @@ public void applyInput(
if( this.rbDiskStationD004_20.isSelected() ) {
diskStation = KC85.VALUE_D004;
diskStationRom = KC85.VALUE_ROM_20;
} else if( this.rbDiskStationD004_33.isSelected() ) {
} else if( this.rbDiskStationD004_35.isSelected() ) {
diskStation = KC85.VALUE_D004;
diskStationRom = KC85.VALUE_ROM_33;
diskStationRom = KC85.VALUE_ROM_35;
} else if( this.rbDiskStationD008.isSelected() ) {
diskStation = KC85.VALUE_D008;
}
Expand Down Expand Up @@ -917,7 +917,7 @@ protected boolean doAction( EventObject e )
doModuleIntoDiskStation();
} else if( (src == this.rbDiskStationNone)
|| (src == this.rbDiskStationD004_20)
|| (src == this.rbDiskStationD004_33)
|| (src == this.rbDiskStationD004_35)
|| (src == this.rbDiskStationD008)
|| (src == this.rbDiskStationSpeedDefault)
|| (src == this.rbDiskStationSpeed8MHz)
Expand Down Expand Up @@ -1100,7 +1100,7 @@ else if( romType.toLowerCase().startsWith( KC85.VALUE_PREFIX_FILE ) ) {
if( diskStationRom20 ) {
this.rbDiskStationD004_20.setSelected( true );
} else {
this.rbDiskStationD004_33.setSelected( true );
this.rbDiskStationD004_35.setSelected( true );
}
break;
case KC85.VALUE_D008:
Expand Down Expand Up @@ -1548,7 +1548,7 @@ private int getSelectedModuleModelRow()
private boolean isDiskStationEnabled()
{
return this.rbDiskStationD004_20.isSelected()
|| this.rbDiskStationD004_33.isSelected()
|| this.rbDiskStationD004_35.isSelected()
|| this.rbDiskStationD008.isSelected();
}

Expand Down Expand Up @@ -1646,7 +1646,7 @@ private void showModuleChangePopup( Component c, int x, int y )
private void updDiskStationFieldsEnabled()
{
boolean d4_20 = this.rbDiskStationD004_20.isSelected();
boolean d4_33 = this.rbDiskStationD004_33.isSelected();
boolean d4_33 = this.rbDiskStationD004_35.isSelected();
boolean state = (d4_20 || d4_33 || this.rbDiskStationD008.isSelected());
this.tabGIDE.setEnabledEx( state, d4_20 || d4_33 );
this.labelDiskStationRom.setEnabled( state );
Expand Down
4 changes: 2 additions & 2 deletions src/jkcemu/etc/ChessboardFrm.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (c) 2009-2020 Jens Mueller
* (c) 2009-2022 Jens Mueller
*
* Kleincomputer-Emulator
*
Expand Down Expand Up @@ -161,9 +161,9 @@ private ChessboardFrm( EmuThread emuThread )


// Fenstergroesse
pack();
setResizable( false );
if( !applySettings( Main.getProperties() ) ) {
pack();
setLocationByPlatform( true );
}
}
Expand Down
Loading

0 comments on commit ff303fe

Please sign in to comment.