mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-24 04:42:51 -04:00
ROM also uses new root file approach
This commit is contained in:
parent
1a0cb0b7a9
commit
8b77ecd513
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
package de.neemann.digital.core.memory;
|
package de.neemann.digital.core.memory;
|
||||||
|
|
||||||
|
import de.neemann.digital.FileLocator;
|
||||||
import de.neemann.digital.core.*;
|
import de.neemann.digital.core.*;
|
||||||
import de.neemann.digital.core.element.Element;
|
import de.neemann.digital.core.element.Element;
|
||||||
import de.neemann.digital.core.element.ElementAttributes;
|
import de.neemann.digital.core.element.ElementAttributes;
|
||||||
@ -120,7 +121,8 @@ public class ROM extends Node implements Element, ROMInterface, ProgramMemory {
|
|||||||
if (hexFile == null)
|
if (hexFile == null)
|
||||||
throw new NodeException(Lang.get("err_ROM_noFileGivenToLoad"), this, -1, null);
|
throw new NodeException(Lang.get("err_ROM_noFileGivenToLoad"), this, -1, null);
|
||||||
try {
|
try {
|
||||||
data = Importer.read(hexFile, dataBits);
|
File f = new FileLocator(hexFile).setLibraryRoot(model.getRootPath()).locate();
|
||||||
|
data = Importer.read(f, dataBits);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new NodeException(e.getMessage(), this, -1, null);
|
throw new NodeException(e.getMessage(), this, -1, null);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user