aboutsummaryrefslogtreecommitdiff
path: root/src/output.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2016-03-14 16:24:48 +0000
committerIan C <ianc@noddybox.co.uk>2016-03-14 16:24:48 +0000
commite23a3e98bf4afc6bc900a427c20c01feac476d1a (patch)
tree57957cf943e267445724b9339160b9d1890549a4 /src/output.c
parent9edfd06f3a609ff6a6c87e3d7bea4e1728eea474 (diff)
Initial code for handling of memory banks.
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/output.c b/src/output.c
index 3b1809f..ccad6af 100644
--- a/src/output.c
+++ b/src/output.c
@@ -193,16 +193,23 @@ CommandStatus OutputSetOption(int opt, int argc, char *argv[],
int OutputCode(void)
{
- int min = GetMinAddressWritten();
- int max = GetMaxAddressWritten();
- const Byte *mem = AddressSpace();
+ const MemoryBank *bank = MemoryBanks();
+ int min;
+ int max;
+ const Byte *mem;
- if (max == -1)
+ if (!bank)
{
fprintf(stderr, "Skipping output; no written memory to write\n");
return TRUE;
}
+ /* TODO: Fix to pass banks proper
+ */
+ min = bank[0].min_address_used;
+ max = bank[0].max_address_used;
+ mem = bank[0].memory;
+
switch(format)
{
case Raw: