Skip to content

Commit

Permalink
Align with latest libcmini
Browse files Browse the repository at this point in the history
Apparently, this also fixes the getcookie() bug.
  • Loading branch information
mikrosk committed Dec 27, 2021
1 parent 1b6941b commit e4a9abc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*~
udump.tos
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CFLAGS = -m68000 -O2 -fomit-frame-pointer -Wall -I$(LIBCMINI_INCLUDE) -nostdlib
LDFLAGS = -s -L$(LIBCMINI_BUILD) -lcmini -nostdlib -lgcc

$(TARGET): udump.c
$(CC) $(CFLAGS) -o $@ $(LIBCMINI_BUILD)/startup.o $< $(LDFLAGS)
$(CC) $(CFLAGS) -o $@ $(LIBCMINI_BUILD)/crt0.o $< $(LDFLAGS)

clean:
rm -f *~ *.o $(TARGET)
4 changes: 2 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is uDump 1.01, a simple TOS ROM dump tool for Atari ST/STE/TT/Falcon
This is uDump 1.02, a simple TOS ROM dump tool for Atari ST/STE/TT/Falcon
computers. I made it because there isn't one single realiable tool of this kind
running on all Atari models, resp. dumping properly all the possible TOS sizes.

Expand All @@ -9,5 +9,5 @@ The tool is licensed under the GPL v3 license, see COPYING for details.
Enjoy,

Miro Kropacek aka MiKRO / Mystic Bytes
06.07.2018, Kosice / Slovakia
27.12.2021, Kosice / Slovakia
http://mikro.atari.org https://github.com/mikrosk
12 changes: 6 additions & 6 deletions udump.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* You should have received a copy of the GNU General Public License
* along with uDump. If not, see <https://www.gnu.org/licenses/>.
*
* (c) 2018 Miro Kropacek; miro.kropacek@gmail.com
* (c) 2018-2021 Miro Kropacek; miro.kropacek@gmail.com
*/

#include <getcookie.h>
#include <mint/cookie.h>

#include <mint/osbind.h>
#include <mint/sysvars.h>
Expand Down Expand Up @@ -98,8 +98,8 @@ int main(int argc, const char* argv[])
uint32_t tos_build_date;
uint8_t tos_country;
int is_emutos;
unsigned long mch_value = 0;
unsigned long ct60_value = 0;
long mch_value = 0;
long ct60_value = 0;
char* machine;
uint32_t machine_mem;
size_t tos_size = 0;
Expand All @@ -125,8 +125,8 @@ int main(int argc, const char* argv[])
}
}

getcookie(0x5f4d4348UL, &mch_value); /* '_MCH' */
getcookie(0x43543630UL, &ct60_value); /* 'CT60' */
Getcookie(0x5f4d4348UL, &mch_value); /* '_MCH' */
Getcookie(0x43543630UL, &ct60_value); /* 'CT60' */

if (tos_country < countries_size) {
country_code[0] = country_codes[tos_country*2];
Expand Down

0 comments on commit e4a9abc

Please sign in to comment.