Help byte swapping a file.

Atari talk, or the life and the universe and things. Just keep it clean!
Post Reply
User avatar
PhilC
Moderator
Moderator
Posts: 1809
Joined: Fri Mar 23, 2018 8:22 pm

Help byte swapping a file.

Post by PhilC » Sat May 25, 2019 9:07 pm

Evening All,

the long and the short of it is that I'm trying to byte swap Emutos rom file so that I can write it to a 27C4096.

I cant for the life of me find out how to do it with my TL866 and I've tried to do it with Hextoolkit on my Windoze machine.

Can anyone shed some light on the subject as I'm being incredibly thick today.

Ta
If it ain't broke, test it to Destruction.

User avatar
supaduper
Posts: 160
Joined: Thu Nov 08, 2018 12:05 pm

Re: Help byte swapping a file.

Post by supaduper » Sat May 25, 2019 9:26 pm

here is some software

install it then:
1, select your device(your Eprom chip)
2.load your file
3 under the `Action` tab select `byte swap`
4. save your new file(its now byte swapped)


if you get errors when running the software dont worry just carry on its just when its loading the program( I use win 8)
also you might have to use ctrl alt del to close the program
Attachments
WillemProg%5Cepr097ja.zip
(911.08 KiB) Downloaded 21 times

User avatar
PhilC
Moderator
Moderator
Posts: 1809
Joined: Fri Mar 23, 2018 8:22 pm

Re: Help byte swapping a file.

Post by PhilC » Sat May 25, 2019 9:32 pm

Cool, thanks
If it ain't broke, test it to Destruction.

User avatar
rpineau
Site Admin
Site Admin
Posts: 491
Joined: Thu Aug 17, 2017 6:08 pm
Location: USA
Contact:

Re: Help byte swapping a file.

Post by rpineau » Sat May 25, 2019 11:45 pm

If you have python available on your system :

Code: Select all

import array
with open("ORIGINAL_FILE_NAME_HERE", "rb") as f:
        data_in = f.read()
       
# word array (2 bytes)
new_data = array.array('H')
new_data.fromstring(data_in)
new_data.byteswap()

with open("BYESWAPPED_FILE_NAME_HERE", 'ab') as f:
        new_data.tofile(f)
Rodolphe
Working ones : MegaSTE (68020) / TT030 / Falcon with AB040 & Eclipse / 1040STF
Need testing : Falcon with CT2

User avatar
rpineau
Site Admin
Site Admin
Posts: 491
Joined: Thu Aug 17, 2017 6:08 pm
Location: USA
Contact:

Re: Help byte swapping a file.

Post by rpineau » Sat May 25, 2019 11:49 pm

Another python tool I built that does some of the above and also started implementing byteswap and 32 bit split in 2x16bit eprom

tosTool.zip
(1.07 KiB) Downloaded 20 times
Working ones : MegaSTE (68020) / TT030 / Falcon with AB040 & Eclipse / 1040STF
Need testing : Falcon with CT2

Post Reply

Return to “CHAT FORUM”