Welcome, Guest. Please login or register.

Author Topic: Kickstart 3.1 (40.72), digital download  (Read 10777 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline orange

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2797
    • Show all replies
Re: Kickstart 3.1 (40.72), digital download
« on: April 28, 2017, 07:39:17 PM »
I wrote one too. not elegant, but works.

32_split.cpp:
Code: [Select]


#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <sstream>
#include <cstring>
#include <string>
#include <cstdlib>

using namespace std;
static char Fajl[600000];
int ok=0;

//funkcija koja daje duzinu fajla
const int file_length(const char * f)
{
  long m;
  ifstream file (f, ios::in|ios::binary);
  file.seekg (0, ios::end);
  m = file.tellg();
  file.close();
  return m;
}

                            //    MAIN    

int main()
{

ofstream SaveFileODD(&quot;odd.bin&quot;, ios_base::out | ios::binary);  // Izlazni fajl
ofstream SaveFileEVEN(&quot;even.bin&quot;, ios_base::out | ios::binary);  // Izlazni fajl


 const int filesize=file_length(&quot;rom_all.bin&quot;);

ifstream OpenFile(&quot;rom_all.bin&quot;, ios::binary); // citanje 1.BIN
for(int t=0; t < filesize; ++t) OpenFile.get(Fajl[t]);
  OpenFile.close();

 for(int t=0; t < filesize; t+=4) SaveFileODD << Fajl[t] << Fajl[t+1];
 for(int t=0; t < filesize; t+=4) SaveFileODD << Fajl[t] << Fajl[t+1];
  SaveFileODD.close();

 for(int t=2; t < filesize; t+=4) SaveFileEVEN << Fajl[t] << Fajl[t+1];
 for(int t=2; t < filesize; t+=4) SaveFileEVEN << Fajl[t] << Fajl[t+1];
  SaveFileEVEN.close();
 

   cout << &quot;Done! &quot;; cin.get();
}





byteswap.cpp
Code: [Select]


#include
#include
#include
#include
#include
#include
#include

using namespace std;
static char Fajl[1100000];
int ok=0;

//funkcija koja daje duzinu fajla
const int file_length(const char * f)
{
  long m;
  ifstream file (f, ios::in|ios::binary);
  file.seekg (0, ios::end);
  m = file.tellg();
  file.close();
  return m;
}

                            //    MAIN    

int main()
{

ofstream SaveFileODD("swapped.bin", ios_base::out | ios::binary);  // Izlazni fajl


 const int filesize=file_length("toswap.bin");

ifstream OpenFile("toswap.bin", ios::binary); // citanje 1.BIN
for(int t=0; t < filesize; ++t) OpenFile.get(Fajl[t]);
  OpenFile.close();

 for(int t=0; t < filesize; t+=2) SaveFileODD << Fajl[t+1] << Fajl[t];

  SaveFileODD.close();

 

   cout << "Done! "; cin.get();
}
Better sorry than worry.
 

Offline orange

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2797
    • Show all replies
Re: Kickstart 3.1 (40.72), digital download
« Reply #1 on: April 29, 2017, 09:24:44 AM »
Quote from: Jeff;825109
I have tried this twice and it's not working for me.  I burned Kickstart ROMs successfully about 10 years ago and I had a heck of a time figuring it out then. It seems as though I have lost the magic again.  I can duplicate working ROMs fine so it's in the software side of things. I'll be watching here :D

@Orange
This is great do you have a binary compiled somewhere?


yes, I have both windows and linux binaries, here they are (cant remember, probably 32bit)
 http://s000.tinyupload.com/?file_id=26548232869115268967

I couldn't attach them here because of ridiculously small size limit.
Better sorry than worry.
 

Offline orange

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2797
    • Show all replies
Re: Kickstart 3.1 (40.72), digital download
« Reply #2 on: April 29, 2017, 11:43:43 AM »
:)

seems the input file should be in same dir, and named "rom_all.bin" or "toswap.bin".
can't remember, used it long ago.
Better sorry than worry.