Wiki source code of Elona Porting Project Overview

Last modified by John Stroy on 2018/10/19 11:40

Hide last authors
John Stroy 18.1 1 {{toc/}}
2
John Stroy 5.1 3 The Elona Porting Project aims to create an extensible and maintainable port of the roguelike [[Elona]].
John Stroy [Xino] 1.1 4
John Stroy 9.2 5 Please note that this project is **not** officially sanctioned by [[Noa]].
John Stroy 8.2 6
John Stroy 13.2 7 The project aims to make an initial port of Elona to Java (pure, no native code outside of the Java platform) through the [[HSPlet framework>>HSPlet]] that will be nearly 100% compatible with mainline Elona. Within reasonable bounds, the port should behave just like mainline Elona. Some aspects are difficult or impossible within the provided constraints (for example, inter-process mutexes do not exist in pure Java; therefore, prohibiting multiple active instances through inter-process mutexes would not be possible); such aspects should be minimized if possible.
John Stroy [Xino] 1.1 8
John Stroy 4.1 9 = Resources =
John Stroy [Xino] 1.1 10
11 HSPlet will be used to bring up the initial port of Elona on Java.
12
John Stroy 6.1 13 = Background =
John Stroy [Xino] 1.1 14
John Stroy 6.1 15 HSP compiles files into its own object code format, commonly called "packfiles." These files contain byte code that interpreted at runtime by the HSP runtime virtual machine. start.ax is the entry point for most HSP programs, including Elona.
16
John Stroy 19.1 17 [[HSPlet]] is an implementation of the HSP runtime environment in Java through a compiler and HSPlet runtime library. HSPlet compiles [[HSP's bytecode>>ReferenceDocuments.hsp3code\.txt]] files into one or more Java .class files.
John Stroy 6.1 18
John Stroy 17.2 19 = Rationale =
20
21 == Why Java? ==
22
23 1. It's a fairly popular language.
24
25 1. It can host many other languages, from Python (Jython) and Ruby (JRuby) to Clojure and Scala.
26
27 1. It is a memory managed high-level language.
28
29 1. The performance of the JVM is reasonably high, compared to other high-level languages.
30
31 1. HSPlet is written in Java (it exists already)
32
33 == Why HSPlet? ==
34
35 1. It already exists and works for small programs.
36
37 1. It is reasonably readable.
38
39 1. Source is available.
40
John Stroy 4.1 41 = Requirements =
John Stroy 2.1 42
John Stroy [Xino] 1.1 43 ToDo
44
45
John Stroy 4.1 46 = Objectives/Milestones =
John Stroy 2.1 47
John Stroy 15.1 48 * [[HSP Extension>>Main.HSP Extensions Required in Elona]]
49 ** stubs - done!
50 * HSPlet [[new opcode>>Main.HSP Opcodes Required in Elona]]
51 ** enhancement stubs - done!
52 * HSPlet new opcode enhancement implementation
53 ** Mostly done - missing some extended [[DllCtrl opcode>>Main.HSP Opcodes Required in Elona#DllCtrl]] implementations, [[COM>>Main.Microsoft Windows#COM]] interaction.
54 * Elona compilation on HSPlet
55 ** Done! Private branch of HSPlet compiles Elona successfully.
John Stroy 20.1 56 * Elona port with stubbed extensions
John Stroy 15.1 57 ** --Broken - the constant pool has [[overflowed]] because of the number of generated c onstants. [[VMspec]] indicates that there can be at most 65536 [[constant pool]] entries. Currently, there are approximately 135000 constant pool entries after a source-level modification to Elona to reduce the number of constants.--
58 ** Done, as of 2011 June 11.
59 * Elona port that verifies in the Sun RI JVM bytecode verifier
John Stroy 15.2 60 ** --Blocked, due to generated run() method exceeding 64k barrier for Code attribute of a Method.--
John Stroy 15.1 61 ** Fortunately, this is slightly easier to fix.
John Stroy 17.1 62 *** --Tasklet: Provide a trampoline to merge consecutive method calls that do not have labels. Assigned: JammyHammy--
John Stroy 15.2 63 ** Kejardon has fixed this (as of changeset [[940c67e3a1cc>>https://bitbucket.org/jdstroy/hsplet/changeset/940c67e3a1cc]])
John Stroy 15.1 64 * Elona port with implemented [[extensions]]
John Stroy 20.1 65 ** The required extensions exist.
66 ** Miscellaneous extensions are not complete (water, user32.dll NumLock control, DSound/DMusic/DInput)
67 ** Graphics performance is painful.
John Stroy 11.1 68 * Working Elona port, equivalent to Elona 1.22
John Stroy 20.1 69 ** Pre-Alpha 1 released. This is close to 1.22, but not equivalent yet.
John Stroy 11.1 70 * Enhanced Elona port - extensibility hooks provided
71 * Enhanced Elona port - extensibility hooks implemented
72 * Enhanced Elona port - extensibility hooks used to provide [[i18n]] support, [[graphics pack]] support, [[music pack]] support
73 * Enhanced Elona port - extensibility hooks used to reduce the amount of hardcoded data within the game
74 * Enhanced Elona port - extensibility hooks used to provide expandable storage