Skip to content

Commit

Permalink
Provide hardcoded font and text-string data
Browse files Browse the repository at this point in the history
while we haven't yet figured out how to extract the data directly from the original game files.
(issue felipesanches#15)
  • Loading branch information
felipesanches committed Mar 25, 2022
1 parent 0edcae0 commit c58b225
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- Toolchain for software development targeting the virtual machine originally designed for Eric Chahi's Another World game.
- The scripts in this repo are Licensed under the GPL version 2 or later
- All scripts require Python 3.
- There's a MAME fork with an implementation of the Another World VM available at https://github.com/felipesanches/mame/tree/anotherworld which can be used to run any "romset" compiled with the assembler provided by this toolchain.
- There's a MAME fork with an implementation of the Another World VM available at https://github.com/felipesanches/mame/tree/anotherworld which can be used to run any "romset" compiled with the assembler provided by this toolchain. (**Note:** Do not forget to also copy the text-string and font ROMs from the `hardcoded_data` directory to your MAME rompath when running the driver - See also: issue #15)

## Scripts Descriptions and Use

Expand Down
Binary file added hardcoded_data/anotherworld_chargen.rom
Binary file not shown.
Binary file added hardcoded_data/str_data.rom
Binary file not shown.
Binary file added hardcoded_data/str_index.rom
Binary file not shown.
21 changes: 20 additions & 1 deletion resources2romset.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@
video2_resource_id = 0x11


def generate_text_and_font_data_roms():
'''
FIXME: This should ideally be extracted from the original game files
but we currently don't know how to do it, so we keep these hardcoded
ROM files which where put together based on the hardcoded data found
in the Adrien Sanglard's VM codebase:
https://github.com/fabiensanglard/Another-World-Bytecode-Interpreter
See also:
https://github.com/felipesanches/AnotherWorld_VMTools/issues/15
'''
import shutil
for filename in ['anotherworld_chargen.rom',
'str_data.rom',
'str_index.rom']:
shutil.copyfile(f'hardcoded_data/{filename}',
f'{output_dir}/{filename}')


def generate_bytecode_rom():
bytecode_rom = open(f"{output_dir}/bytecode.rom", "wb")
for res in bytecode_resource_ids:
Expand Down Expand Up @@ -140,4 +159,4 @@ def generate_video2_rom():
generate_palettes_rom()
generate_cinematic_rom()
generate_video2_rom()

generate_text_and_font_data_roms()

0 comments on commit c58b225

Please sign in to comment.