X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosFlash.java;h=9bf0da2526e8e9339f1ca496836d7e829f83c454;hb=3a2a5a05bb6372d9003905cee7afdfcd6d38ae7e;hp=e4b980b07cc1dcbdc97a906ec639e80fb13a5b77;hpb=87c8bb3956897830da1f7aaca2990a9571767b73;p=fw%2Faltos diff --git a/altoslib/AltosFlash.java b/altoslib/AltosFlash.java index e4b980b0..9bf0da25 100644 --- a/altoslib/AltosFlash.java +++ b/altoslib/AltosFlash.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -15,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_8; +package org.altusmetrum.altoslib_12; import java.io.*; @@ -253,7 +254,7 @@ public class AltosFlash extends AltosProgrammer { clock_init(); int remain = image.data.length; - int flash_addr = image.address; + int flash_addr = (int) image.address; int image_start = 0; action("start", 0); @@ -294,7 +295,7 @@ public class AltosFlash extends AltosProgrammer { if (!aborted) { action("done", 100); if (debug != null) { - debug.set_pc(image.address); + debug.set_pc((int) image.address); debug.resume(); } } @@ -330,12 +331,16 @@ public class AltosFlash extends AltosProgrammer { rom_config = romconfig; } - public AltosRomconfig romconfig() throws InterruptedException { + public AltosRomconfig target_romconfig() throws InterruptedException { if (!check_rom_config()) return null; return rom_config; } + public AltosRomconfig image_romconfig() { + return new AltosRomconfig(image); + } + public AltosFlash(File file, AltosLink link, AltosFlashListener listener) throws IOException, FileNotFoundException, InterruptedException { this.file = file;