From fd6e420008245fe1fdcddc34649ddabe9b8485cc Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 10 Dec 2018 12:53:39 +0100 Subject: [PATCH] use word for C64 loadAddr --- src/miscfileformats.c | 47 ++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/src/miscfileformats.c b/src/miscfileformats.c index e6afc1ea..1596e533 100644 --- a/src/miscfileformats.c +++ b/src/miscfileformats.c @@ -3115,10 +3115,10 @@ void Load_C64(T_IO_Context * context) * * @param[in,out] saveFormat one of the C64 mode from @ref c64_format * @param[in,out] saveWhat 0=All, 1=Only bitmap, 2=Only Screen RAM, 3=Only color RAM - * @param[in,out] loadAddr actual load address/0x2000 or 0 for "None" + * @param[in,out] loadAddr actual load address or 0 for "None" * @return true to proceed, false to abort */ -static int Save_C64_window(enum c64_format *saveFormat, byte *saveWhat, byte *loadAddr) +static int Save_C64_window(enum c64_format *saveFormat, byte *saveWhat, word *loadAddr) { int button; unsigned int i; @@ -3140,6 +3140,10 @@ static int Save_C64_window(enum c64_format *saveFormat, byte *saveWhat, byte *lo "$C000", "$E000" }; + // default addresses : + // - FLI Fli Graph 2 (BlackMail) => $3b00 + // - multicolor (Koala Painter) => $6000 + // - hires (InterPaint) => $4000 Open_window(200,120,"C64 saving settings"); Window_set_normal_button(110,100,80,15,"Save",1,1,KEY_RETURN); // 1 @@ -3152,7 +3156,7 @@ static int Save_C64_window(enum c64_format *saveFormat, byte *saveWhat, byte *lo Window_dropdown_add_item(what,i,what_label[i]); Print_in_window(113,18,"Address:",MC_Dark,MC_Light); - addr = Window_set_dropdown_button(110,28,70,15,70,address_label[*loadAddr/32],1, 0, 1, LEFT_SIDE,0); // 4 + addr = Window_set_dropdown_button(110,28,70,15,70,address_label[*loadAddr/0x2000],1, 0, 1, LEFT_SIDE,0); // 4 Window_dropdown_clear_items(addr); for (i=0; iWidth!=320) && (context->Width!=160)) || context->Height!=200) {