machine/gameboy-advance: allow TinyGo to directly output GBA files that are ready for flashing by performing objcopy

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2019-09-21 10:47:32 +02:00
committed by Ayke
parent 7732c6f449
commit a7d00f1b6d
3 changed files with 6 additions and 2 deletions
+4
View File
@@ -108,6 +108,10 @@ func Objcopy(infile, outfile string) error {
// Write to the file, in the correct format.
switch filepath.Ext(outfile) {
case ".gba":
// The address is not stored in a .gba file.
_, err := f.Write(data)
return err
case ".bin":
// The address is not stored in a .bin file (therefore you
// should use .hex files in most cases).