Skip to content

Commit

Permalink
Merge branch 'java-17'
Browse files Browse the repository at this point in the history
  • Loading branch information
ullenius committed Jan 9, 2023
2 parents 31e3ff9 + c617469 commit c1801bb
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 24 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ I've included a compiled jar-file with /lib dir to simplify for end-users who ca
## :wrench: Development
1. I wrote this because there was a lack of tools supporting the SPC-format.
1. And it would be a fun project to learn binary I/O in Java.
1. Lastly, **spctag** has the best support for parsing the *"Emulator used for dumping SPC"*-tag :grin:
2. And it would be a fun project to learn binary I/O in Java.
3. Lastly, **spctag** has the best support for parsing the *"Emulator used for dumping SPC"*-tag :grin:
Most of the existing tools are 15-20 year old legacy Windows programs that won't run on modern computers. The source code is lost. Or it was written in C/C++ for 32-bit architecture and won't compile on modern 64-bit computers.
Expand All @@ -85,28 +85,28 @@ There are two different set of specifications for emulator codes available. The
### :jp: Japanese spec
The following byte-values are used according to the [Japanese spec](https://dgrfactory.jp/spcplay/id666.html):

Emulator name | Text format | Binary format
------------ | -------------| -------------
Unknown | 0x30 | 0x00
ZSNES | 0x31 | 0x01
Snes9x| 0x32 | 0x02
ZST2SPC| 0x33| 0x03
Other | 0x34 | 0x04
SNEShout| 0x35 | 0x05
ZSNES / W | 0x36 | 0x06
Snes9xpp | 0x37 | 0x07
SNESGT | 0x38 | 0x08
| Emulator name | Text format | Binary format |
|---------------|-------------|---------------|
| Unknown | 0x30 | 0x00 |
| ZSNES | 0x31 | 0x01 |
| Snes9x | 0x32 | 0x02 |
| ZST2SPC | 0x33 | 0x03 |
| Other | 0x34 | 0x04 |
| SNEShout | 0x35 | 0x05 |
| ZSNES / W | 0x36 | 0x06 |
| Snes9xpp | 0x37 | 0x07 |
| SNESGT | 0x38 | 0x08 |

Note: *Other* and *Unknown* are both specified with unique values (?) somehow...

### :older_woman: Legacy spec
Only 3 values are defined in the legacy spec (SPC File Format v.0.31 txt-file)

Emulator name | Text format | Binary format
------------ | -------------| -------------
Unknown | 0x0 | 0x00
ZSNES | 0x01 | 0x01
Snes9x| 0x02 | 0x02
| Emulator name | Text format | Binary format |
|---------------|-------------|---------------|
| Unknown | 0x0 | 0x00 |
| ZSNES | 0x01 | 0x01 |
| Snes9x | 0x02 | 0x02 |

### :factory: Factory Method
* *se.anosh.spctag.emulator.factory* contains a factory method.
Expand Down
6 changes: 3 additions & 3 deletions SPCFormat_031.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Addendum:
* changed the version number to v0.31
* Detecting the format of the SPC file (binary or text) can be a bit tricky, since fields
might contain ambiguous values and there's no format indicator. Some fields have
different offsets depending of the format, which might help with the detection. The
different offsets depending on the format, which might help with the detection. The
current Win32 version of ZSNES saves binary SPC files; SNES9x saves in text format.

* Fixed binary dumped date. 2022
Expand Down Expand Up @@ -60,8 +60,8 @@ ID666 Tag (binary format):
0007Eh 32 Comments

----
0009Eh 1 Date SPC was dumped. Day part. (1 - 31
0009Fh 1 Date SPC was dumped. Month part. (1 - 12)
0009Eh 1 Date SPC was dumped. Day part (1 - 31)
0009Fh 1 Date SPC was dumped. Month part (1 - 12)
000A0h 2 Date SPC was dumped. Year part (1 - 9999)
--- A.U 2022, fixed dumped date

Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.2.0
* Migrate to Java 17
* Minor refactoring
* Documentation fixes (markdown and typos)

## v2.1.0
* Bug fix: Display empty string if dumped-date is not set (instead of printing `null`)
### Code refactoring
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>

<build>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/se/anosh/spctag/dao/SpcDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public interface SpcDao {

public Id666 read() throws IOException;
public Id666 read();
public Xid6 readXid6() throws IOException;

}

0 comments on commit c1801bb

Please sign in to comment.