Skip to content

Commit

Permalink
Add support for 1024KB ROM image
Browse files Browse the repository at this point in the history
This image is primarily intended for Hatari, since original Atari
hardware does not support ROMs of this size.
  • Loading branch information
anodynesoftware committed Mar 5, 2021
1 parent 8c03a33 commit 8d9736c
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 12 deletions.
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile - the EmuTOS overbloated Makefile
#
# Copyright (C) 2001-2020 The EmuTOS development team.
# Copyright (C) 2001-2021 The EmuTOS development team.
#
# This file is distributed under the GPL, version 2 or at your
# option any later version. See doc/license.txt for details.
Expand Down Expand Up @@ -50,6 +50,7 @@ help:
@echo "192 $(ROM_192), EmuTOS ROM padded to size 192 KB"
@echo "256 $(ROM_256), EmuTOS ROM padded to size 256 KB"
@echo "512 $(ROM_512), EmuTOS ROM padded to size 512 KB"
@echo "1024 $(ROM_1024), EmuTOS ROM padded to size 1024 KB"
@echo "aranym $(ROM_ARANYM), suitable for ARAnyM"
@echo "firebee $(SREC_FIREBEE), to be flashed on the FireBee"
@echo "firebee-prg emutos.prg, a RAM tos for the FireBee"
Expand Down Expand Up @@ -546,6 +547,24 @@ $(ROM_PAK3): ROMSIZE = 256
$(ROM_PAK3): emutos.img mkrom
./mkrom pak3 $< $(ROM_PAK3)

#
# 1024kB Image (for Hatari (and potentially other emulators))
#

ROM_1024 = etos1024k.img
SYMFILE = $(addsuffix .sym,$(basename $(ROM_1024)))

.PHONY: 1024
1024: override DEF += -DTARGET_1024
1024: $(ROM_1024) $(SYMFILE)
@MEMBOT=$(call SHELL_SYMADDR,__end_os_stram,emutos.map);\
echo "# RAM used: $$(($$MEMBOT)) bytes ($$(($$MEMBOT - $(MEMBOT_TOS404))) bytes more than TOS 4.04)"
@printf "$(LOCALCONFINFO)"

$(ROM_1024): ROMSIZE = 1024
$(ROM_1024): emutos.img mkrom
./mkrom pad $(ROMSIZE)k $< $(ROM_1024)

#
# ARAnyM Image
#
Expand Down
2 changes: 1 addition & 1 deletion doc/emudesk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ present in EMUDESK.INF *will* be loaded. So even with the 192K ROMs,
you can set up your own preferred menu item shortcuts by inserting them
in EMUDESK.INF. If you are knowledgeable and careful, you could edit
EMUDESK.INF directly. But an easier way is to launch a PRG version of
the 256K or 512K ROMs, set up the shortcuts there, and save the desktop.
EmuTOS, set up the shortcuts there, and save the desktop.

Other ROMs:
This is equivalent to the corresponding Atari TOS menu item. You may do
Expand Down
8 changes: 4 additions & 4 deletions doc/incompatible.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ Unique issues
Program: Art for Kids
---------------------
Error: crash during program startup, before anything is displayed, when
using 512K ROMs
using 512K/1024K ROMs

Bug analysis:
The program uses the TOS version in the OS header to decide how to
interpret the country code in os_conf. If the version is not 4, the
program assumes a valid country code and uses it as an index into an
array of pointers. EmuTOS 512K ROMs use a TOS version of 2, but set
array of pointers. EmuTOS 512K/1024K ROMs use a TOS version of 2, but set
os_conf to 0xff to indicate multilanguage. This causes a crash when the
program indexes beyond the end of the array and loads a garbage pointer.

Expand Down Expand Up @@ -400,13 +400,13 @@ Use NVDI.

Program: Warp9 v3.80 (and probably all other versions)
------------------------------------------------------
Errors: Crash during EmuDesk startup (512K versions of EmuTOS)
Errors: Crash during EmuDesk startup (512K/1024K versions of EmuTOS)
EmuDesk screen drawing errors (other versions)

Bug analysis:
The crash is caused because Warp9 implicitly assumes that VDI's physical
workstation structure is in the first 32K of memory. This is not true
for the 512K versions of EmuTOS. The screen drawing errors are under
for the 512K/1024K versions of EmuTOS. The screen drawing errors are under
investigation, but may be caused by assumptions about the contents of
internal VDI structures.
NOTE: under EmuTOS releases prior to 1.0, Warp9 fails to install and
Expand Down
53 changes: 53 additions & 0 deletions doc/readme-1024k.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
EmuTOS - 1024 KB version

This ROM image is not suitable for original Atari hardware, due to
hardware restrictions. It is suitable for the following emulators:
- Hatari

This ROM image is the optimal one for Hatari, with any combination of
emulated hardware.

Some legacy programs may not work with a 1024k image; for these one may
need to use a smaller EmuTOS image.

etos1024k.img - Multilanguage
etos1024k.sym - Symbol address information for Hatari debugger and profiler

The following optional files are also supplied:
emuicon.rsc - contains additional icons for the desktop
emuicon.def - definition file for the above

Additional information on debugging EmuTOS and its software compatibility
is included with Hatari:
https://hatari.tuxfamily.org/doc/emutos.txt

The default language is English. Other supported languages are:
- Czech
- Dutch
- Finnish
- French
- German
- Greek
- Hungarian
- Italian
- Norwegian
- Polish
- Russian
- Spanish
- Swedish
- Swiss German
- Turkish
They can be selected by setting the NVRAM appropriately.

Notes on possible points of confusion
1. The emuicon.rsc file format differs from deskicon.rsc used by later
versions of the Atari TOS desktop.
2. Selecting Norwegian/Swedish currently sets the language to English,
but the keyboard layout to Norwegian/Swedish.
3. The 'Shutdown' menu item is active when EmuTOS is run under an
emulator supporting NatFeats (under Hatari, you need to enable this
with the "--natfeats on" option).

This ROM image has been built using:
make 1024

4 changes: 1 addition & 3 deletions doc/readme-512k.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ This ROM is suitable for the following hardware:

Note: Extra hardware is autodetected.

This ROM is the optimal one for Hatari, with any hardware combination.

Some legacy programs don't work with 512k TOS images, for those one may
Some legacy programs may not work with a 512k image; for these one may
need to use a smaller EmuTOS image.

etos512k.img - Multilanguage
Expand Down
2 changes: 1 addition & 1 deletion include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@
* TOS2 allows 512 vertices, TOS3/TOS4 allow 1024.
*/
#ifndef MAX_VERTICES
# if defined(TARGET_512) || defined(TARGET_PRG) || defined(MACHINE_FIREBEE) || defined(MACHINE_M548X)
# if defined(TARGET_1024) || defined(TARGET_512) || defined(TARGET_PRG) || defined(MACHINE_FIREBEE) || defined(MACHINE_M548X)
# define MAX_VERTICES 1024
# else
# define MAX_VERTICES 512
Expand Down
25 changes: 23 additions & 2 deletions release.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# release.mk - Makefile fragment for building releases
#
# Copyright (C) 2011-2020 The EmuTOS development team.
# Copyright (C) 2011-2021 The EmuTOS development team.
#
# Authors:
# VRI Vincent Rivière
Expand Down Expand Up @@ -49,6 +49,27 @@ release-src:
tar -C $(RELEASE_DIR) --owner=0 --group=0 -zcf $(RELEASE_DIR)/$(RELEASE_SRC).tar.gz $(RELEASE_SRC)
rm -r $(RELEASE_DIR)/$(RELEASE_SRC)

.PHONY: release-1024k
NODEP += release-1024k
RELEASE_1024K = emutos-1024k-$(VERSION)
release-1024k:
$(MAKE) clean
$(MAKE) 1024
mkdir $(RELEASE_DIR)/$(RELEASE_1024K)
cp etos1024k.img etos1024k.sym $(RELEASE_DIR)/$(RELEASE_1024K)
cp desk/icon.def $(RELEASE_DIR)/$(RELEASE_1024K)/emuicon.def
cp desk/icon.rsc $(RELEASE_DIR)/$(RELEASE_1024K)/emuicon.rsc
cat doc/readme-1024k.txt readme.txt >$(RELEASE_DIR)/$(RELEASE_1024K)/readme.txt
mkdir $(RELEASE_DIR)/$(RELEASE_1024K)/doc
cp $(DOCFILES) $(RELEASE_DIR)/$(RELEASE_1024K)/doc
mkdir $(RELEASE_DIR)/$(RELEASE_1024K)/extras
cp $(EXTRAFILES) $(RELEASE_DIR)/$(RELEASE_1024K)/extras
cp aes/mform.def $(RELEASE_DIR)/$(RELEASE_1024K)/extras/emucurs.def
cp aes/mform.rsc $(RELEASE_DIR)/$(RELEASE_1024K)/extras/emucurs.rsc
find $(RELEASE_DIR)/$(RELEASE_1024K) -name '*.txt' -exec unix2dos '{}' ';'
cd $(RELEASE_DIR) && zip -9 -r $(RELEASE_1024K).zip $(RELEASE_1024K)
rm -r $(RELEASE_DIR)/$(RELEASE_1024K)

.PHONY: release-512k
NODEP += release-512k
RELEASE_512K = emutos-512k-$(VERSION)
Expand Down Expand Up @@ -354,7 +375,7 @@ release-emucon:
.PHONY: release
NODEP += release
release: clean release-clean release-mkdir \
release-src release-512k release-256k release-192k release-cartridge \
release-src release-1024k release-512k release-256k release-192k release-cartridge \
release-aranym release-firebee release-amiga-rom release-amiga-floppy \
release-lisa \
release-m548x-dbug release-m548x-bas release-prg release-floppy \
Expand Down

0 comments on commit 8d9736c

Please sign in to comment.