Skip to content

Commit 0ce98f7

Browse files
committed
1.3.9 Bug fixes & improvements
1 parent 8207e99 commit 0ce98f7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1920
-1964
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
*.DS_Store
2-
*.icloud
3-
*.kextraction
2+
*.icloud

README.md

Lines changed: 13 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Licensed under the MIT License (view LICENSE.md for more information)
1010
<img src="https://raw.githubusercontent.com/ayvacs/gba.js.org/gh-pages/assets/images/readme-card.png">
1111

1212
<h1 align="center">GBA Online</h1>
13-
<p align="center">A simple, fast, online emulator for the GameBoy Advance</p>
13+
<p align="center">Easily emulate GameBoy Advance games for free in your browser.</p>
1414

1515
<p align="center"><a target="_blank" href="https://gba.js.org">🔗 gba.js.org</a></p>
1616

@@ -21,59 +21,16 @@ Licensed under the MIT License (view LICENSE.md for more information)
2121
</p>
2222
</div>
2323

24-
---
25-
26-
**The older, legacy version of GBA Online is deprecated and no longer available on the website. The new version (Iodine) provides a better user interface and performance. The older version of GBA Online will no longer be able to view or download.**
27-
28-
*Supported versions:* 1.x.x
29-
30-
*Deprecated versions:* 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.15, 0.3
31-
32-
## Let's jump into the game
33-
34-
GBA Online is available without a download at [https://gba.js.org](gba.js.org)!
35-
36-
### Web-App
37-
38-
Saving the website as a Web-App is a convenient way to access the site from anywhere.
39-
40-
**You must be using Google Chrome**
41-
42-
1. Navigate to [gba.js.org](https://gba.js.org/)
43-
2. Click the three dots in the top right → More Tools → Create Shortcut...
44-
3. Check *Open as Window*
45-
4. Click *Create*
46-
47-
And you're done! Pin the app to your taskbar and click to access it from anywhere.
48-
49-
You can pin the app to your taskbar, and it fits in perfectly with macOS.
50-
51-
### Hosting Locally
52-
53-
If you want to download a past version and host it locally, check out the [GitHub releases page](https://github.com/ayvacs/gba.js.org/releases).
54-
55-
## Performance
56-
57-
Supported platforms:
58-
59-
* macOS
60-
* Windows
61-
* iOS
62-
63-
### Known to work well in:
64-
65-
**Windows / MacOS:**
66-
67-
* Google Chrome 96.0.4664.55+
68-
* Firefox 4-27
69-
* MacOS Safari 5.1.5+
24+
<br>
7025

71-
**Mobile:**
26+
---
7227

73-
* iOS Safari on iOS 15.1.1+
28+
<br>
7429

7530
## Libraries
7631

32+
<br>
33+
7734
* [IodineGBA](https://github.com/taisel/IodineGBA)
7835

7936
*A GameBoy Advance emulator that utilizes HTML5 canvas and JavaScript audio APIs to provide a full emulation of the console.*
@@ -92,7 +49,7 @@ Supported platforms:
9249

9350
* [jsemu2/gba](https://github.com/jsemu2/gba)
9451

95-
*a fork of* [*walsh/gba*](https://github.com/walsh/gba)
52+
*A web implementation of IodineGBA*
9653

9754
**License:** [Open Source](https://github.com/jsemu2/gba)
9855

@@ -114,8 +71,14 @@ Supported platforms:
11471

11572
<br>
11673

74+
---
75+
76+
<br>
77+
11778
## License
11879

80+
<br>
81+
11982
<img width="150" height="150" src="https://raw.githubusercontent.com/ayvacs/gba.js.org/gh-pages/assets/images/macos-11x/apple-touch-icon.png" alt="logo">
12083
<br>
12184
<h3>gba.js.org</h3>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<html>
1111

1212
<head>
13-
<link rel="stylesheet" href="assets/user_css/index.css">
14-
<link rel="stylesheet" href="assets/user_css/collapsible.css">
15-
<link rel="stylesheet" href="assets/user_css/particles-js.css">
13+
<link rel="stylesheet" href="assets/stylesheets/index.css">
14+
<link rel="stylesheet" href="assets/stylesheets/collapsible.css">
15+
<link rel="stylesheet" href="assets/stylesheets/particles-js.css">
1616

1717
<link href="assets/images/macos-11x/[email protected]" type="image/png" rel="shortcut icon">
1818
<link href="assets/images/macos-11x/apple-touch-icon.png" type="image/png" rel="apple-touch-icon">
@@ -50,7 +50,7 @@
5050

5151
<br><br><br>
5252
<img id="repo-card" src="assets/images/logo-small.png" height="120px">
53-
<p id="version-card" style="font-size:20px">v1.3.8: Various bug fixes and improvements</p>
53+
<p id="version-card" style="font-size:20px">v1.3.9: Various bug fixes and improvements</p>
5454

5555
<p>Welcome to <b>GBA Online</b>, a modern GameBoy Advance emulator for the web.</p>
5656

@@ -245,9 +245,9 @@ <h3>GAME_BOY_ADVANCE_TEST</h3>
245245
</script>
246246

247247
<!-- Run particles -->
248-
<script src="assets/particles/[email protected]"></script>
248+
<script src="modules/particles/[email protected]"></script>
249249
<script>
250-
particlesJS.load("particles-js", "assets/particles/shapes.json");
250+
particlesJS.load("particles-js", "modules/particles/shapes.json");
251251
</script>
252252
</body>
253253

iodineGBA/README.md

100644100755
File mode changed.

iodineGBA/core/CPU.js

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ GameBoyAdvanceCPU.prototype.HLEReset = function () {
7474
GameBoyAdvanceCPU.prototype.branch = function (branchTo) {
7575
branchTo = branchTo | 0;
7676
//if ((branchTo | 0) > 0x3FFF || this.IOCore.BIOSFound) {
77-
//Branch to new address:
78-
this.registers[15] = branchTo | 0;
79-
//Mark pipeline as invalid:
80-
this.IOCore.flagBubble();
81-
//Next PC fetch has to update the address bus:
82-
this.wait.NonSequentialBroadcastClear();
77+
//Branch to new address:
78+
this.registers[15] = branchTo | 0;
79+
//Mark pipeline as invalid:
80+
this.IOCore.flagBubble();
81+
//Next PC fetch has to update the address bus:
82+
this.wait.NonSequentialBroadcastClear();
8383
/*}
8484
else {
85-
//We"re branching into BIOS, handle specially:
85+
//We're branching into BIOS, handle specially:
8686
if ((branchTo | 0) == 0x130) {
8787
//IRQ mode exit handling:
8888
//ROM IRQ handling returns back from its own subroutine back to BIOS at this address.
@@ -144,8 +144,8 @@ GameBoyAdvanceCPU.prototype.IRQinARM = function () {
144144
//Disable IRQ:
145145
this.modeFlags = this.modeFlags | 0x80;
146146
//if (this.IOCore.BIOSFound) {
147-
//IRQ exception vector:
148-
this.branch(0x18);
147+
//IRQ exception vector:
148+
this.branch(0x18);
149149
/*}
150150
else {
151151
//HLE the IRQ entrance:
@@ -164,8 +164,8 @@ GameBoyAdvanceCPU.prototype.IRQinTHUMB = function () {
164164
//Exception always enter ARM mode:
165165
this.enterARM();
166166
//if (this.IOCore.BIOSFound) {
167-
//IRQ exception vector:
168-
this.branch(0x18);
167+
//IRQ exception vector:
168+
this.branch(0x18);
169169
/*}
170170
else {
171171
//HLE the IRQ entrance:
@@ -181,11 +181,11 @@ GameBoyAdvanceCPU.prototype.HLEIRQEnter = function () {
181181
this.wait.NonSequentialBroadcast();
182182
//Push register(s) into memory:
183183
for (var rListPosition = 0xF; (rListPosition | 0) > -1; rListPosition = ((rListPosition | 0) - 1) | 0) {
184-
if ((0x500F & (1 << (rListPosition | 0))) != 0) {
185-
//Push a register into memory:
186-
currentAddress = ((currentAddress | 0) - 4) | 0;
187-
this.memory.memoryWrite32(currentAddress | 0, this.registers[rListPosition | 0] | 0);
188-
}
184+
if ((0x500F & (1 << (rListPosition | 0))) != 0) {
185+
//Push a register into memory:
186+
currentAddress = ((currentAddress | 0) - 4) | 0;
187+
this.memory.memoryWrite32(currentAddress | 0, this.registers[rListPosition | 0] | 0);
188+
}
189189
}
190190
//Store the updated base address back into register:
191191
this.registers[0xD] = currentAddress | 0;
@@ -203,7 +203,7 @@ GameBoyAdvanceCPU.prototype.HLEIRQExit = function () {
203203
//Updating the address bus away from PC fetch:
204204
this.wait.NonSequentialBroadcast();
205205
//Load register(s) from memory:
206-
for (var rListPosition = 0; (rListPosition | 0) < 0x10; rListPosition = ((rListPosition | 0) + 1) | 0) {
206+
for (var rListPosition = 0; (rListPosition | 0) < 0x10; rListPosition = ((rListPosition | 0) + 1) | 0) {
207207
if ((0x500F & (1 << (rListPosition | 0))) != 0) {
208208
//Load a register from memory:
209209
this.registers[rListPosition & 0xF] = this.memory.memoryRead32(currentAddress | 0) | 0;
@@ -223,16 +223,16 @@ GameBoyAdvanceCPU.prototype.HLEIRQExit = function () {
223223
}
224224
GameBoyAdvanceCPU.prototype.SWI = function () {
225225
//if (this.IOCore.BIOSFound) {
226-
//Mode bits are set to SWI:
227-
this.switchMode(0x13);
228-
//Save link register:
229-
this.registers[14] = this.getLR() | 0;
230-
//Disable IRQ:
231-
this.modeFlags = this.modeFlags | 0x80;
232-
//Exception always enter ARM mode:
233-
this.enterARM();
234-
//SWI exception vector:
235-
this.branch(0x8);
226+
//Mode bits are set to SWI:
227+
this.switchMode(0x13);
228+
//Save link register:
229+
this.registers[14] = this.getLR() | 0;
230+
//Disable IRQ:
231+
this.modeFlags = this.modeFlags | 0x80;
232+
//Exception always enter ARM mode:
233+
this.enterARM();
234+
//SWI exception vector:
235+
this.branch(0x8);
236236
/*}
237237
else {
238238
if ((this.modeFlags & 0x20) != 0) {
@@ -250,19 +250,19 @@ GameBoyAdvanceCPU.prototype.SWI = function () {
250250
GameBoyAdvanceCPU.prototype.UNDEFINED = function () {
251251
//Only process undefined instruction if BIOS loaded:
252252
//if (this.IOCore.BIOSFound) {
253-
//Mode bits are set to SWI:
254-
this.switchMode(0x1B);
255-
//Save link register:
256-
this.registers[14] = this.getLR() | 0;
257-
//Disable IRQ:
258-
this.modeFlags = this.modeFlags | 0x80;
259-
//Exception always enter ARM mode:
260-
this.enterARM();
261-
//Undefined exception vector:
262-
this.branch(0x4);
253+
//Mode bits are set to SWI:
254+
this.switchMode(0x1B);
255+
//Save link register:
256+
this.registers[14] = this.getLR() | 0;
257+
//Disable IRQ:
258+
this.modeFlags = this.modeFlags | 0x80;
259+
//Exception always enter ARM mode:
260+
this.enterARM();
261+
//Undefined exception vector:
262+
this.branch(0x4);
263263
/*}
264264
else {
265-
//Pretend we didn"t execute the bad instruction then:
265+
//Pretend we didn't execute the bad instruction then:
266266
if ((this.modeFlags & 0x20) != 0) {
267267
this.THUMB.incrementProgramCounter();
268268
}

0 commit comments

Comments
 (0)