From 4b4931b243fb2a9d80cab80e4d4aee3bb526adf7 Mon Sep 17 00:00:00 2001 From: Zane Kaminski Date: Wed, 24 Jun 2020 16:58:00 -0400 Subject: [PATCH] Better padding method in GWROMDisk --- rdisk.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/rdisk.c b/rdisk.c index d4e49ac..7df6671 100644 --- a/rdisk.c +++ b/rdisk.c @@ -11,12 +11,20 @@ // This function is here just to put padding at the // beginning of the output file void GWROMDisk() { - StripAddress(&GWROMDisk); - StripAddress(&GWROMDisk); - StripAddress(&GWROMDisk); - StripAddress(&GWROMDisk); - StripAddress(&GWROMDisk); - StripAddress(&GWROMDisk); + __asm__ __volatile__ + ( + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t" + ".long 0x00000000\n\t":::); } #define RDiskSize (0x00180000L)