Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / altoslib / AltosFlash.java
index c8db1f778ab32ff2421f68d7fbac0de9cf208705..9bf0da2526e8e9339f1ca496836d7e829f83c454 100644 (file)
@@ -254,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);
@@ -295,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();
                                }
                        }
@@ -331,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;