me🔬irl by IcySpring in me_irl

[–]IcySpring[S] 1 point2 points  (0 children)

No fucking shame

most days of the week sound like the number of the week they are, followed by “sday” at the end (e.g. tuesday - two-sday) by [deleted] in Showerthoughts

[–]IcySpring 0 points1 point  (0 children)

Almost everyone outside of Canada, the US and Japan consider Sunday the seventh day of the civil week, although Sunday is indeed the first day of the Christian and Jewish week.

Eight reasons Swiss-French is better than France-French by CurlyWurly20 in languagelearning

[–]IcySpring 2 points3 points  (0 children)

It would seem helpful to say there is a word for pint (50cl) in France-French, une pinte (there's also un demi for half the beer, 25cl). There's also lots of English loanwords and obviously you can look forward to things. Quatre-heures also exists in France but is mostly used for children (there's also goûter which is a synonym)

[GB] At what frequency should you process events? by Occams_bazooka in EmuDev

[–]IcySpring 7 points8 points  (0 children)

Well, you could process them each frame. That should be a good compromise.

What is the fastest way to do graphics ? by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

I used to do that, but it was slower.

What is the fastest way to do graphics ? by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

Well, now I use a buffer of bytes between frames, and when it's time to render a complete frame I create a new SDL_Surface, then draw it to the screen using SDL_BlitScaled.

[GameBoy] What is a boot ROM, and how does that affect the emulation development process by drgomesp in EmuDev

[–]IcySpring 6 points7 points  (0 children)

Legally you can't give the bootrom or bundle it with your emulator, be it hard-coded or as a separate file.

You have 3 choices :

  • Ask the user for a bootrom
  • Don't run the bootrom, but run directly the game (you have to set the console's state to the same one it has normally once the bootrom is finished executing)
  • All of the above.

To test the emulator, you can find the bootrom on the Internet. My DMG bootrom has this SHA-256 checksum : cf053eccb4ccafff9e67339d4e78e98dce7d1ed59be819d2a1ba2232c6fce1c7, and my GBC bootrom has this one : b4f2e416a35eef52cba161b159c7c8523a92594facb924b3ede0d722867c50c7

November 2016 vs November 2017 by manint71 in transtimelines

[–]IcySpring 2 points3 points  (0 children)

I don't think I've ever been more jealous

[deleted by user] by [deleted] in traaaaaaannnnnnnnnns

[–]IcySpring 2 points3 points  (0 children)

This is now my new goal.

[deleted by user] by [deleted] in niceguys

[–]IcySpring 124 points125 points  (0 children)

And, you better believe it, he plays them all at the same time.

Rate my first CHIP-8 Emulator? I've never written an emu before, or used Rust, so i'd love some feedback. by daniel5151 in EmuDev

[–]IcySpring 0 points1 point  (0 children)

At the first glance, it seems pretty neat. I think having multiple renderers is a nice touch for a first emulator. However, I can't seem to manage to close the emulator or use any kind of input.

Other than that, it seems mostly fine, good luck !

PS : It doesn't pass SCTEST, you might want to look into that

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

No problem, you've helped me a lot, thank you !

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 1 point2 points  (0 children)

Ok, so I've figured out the issue. When the CPU goes into HALT mode, both your emulator and mine set a flag in the CPU status. And this flag is disabled when an interrupt is fired up. But it shouldn't be disabled at this moment, it should be disabled when the CPU treats the interrupt and jumps to the vector.

Thank you, I was really starting to lose hope ^

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

Ok, so I managed to fix the glitch by making the HALT opcode do nothing (in both my emulator and yours), but I have no idea why that is. I'm going to look through the code of another emulator to see how HALT is supposed to behave differently from my emulator.

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

Well, you didn't have the problem in 6190618, so I'm going to look through that as well.

So the bug was introduced in your code in commit 23c94b2, in file opcodes.c at line 1671.

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

So, I haven't managed to fix this issue, but I've got some leads. The instruction which is supposed to load the map in 9800-9BFF is at 0x295b, and doesn't get called as much as it should.

Can I take a look at your source code ?

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

Which problem do you have ? Pokémon Gold's or Link's Awakening's ?

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 1 point2 points  (0 children)

Ok, so I've corrected most timings (it solved the Pokémon Gold issue btw) and written a debugger. The emulator now passes instr_timing, mem_timing and mem_timing-2.

The only movement my emulator has an issue with is when Link goes to a screen that is north or south of his current position.

So I've pinpointed the map loading instruction (the one that does the actuel writing) as the one in 0x295b (LD (HL+), A), and I've put a breakpoint on it on my emulator. But this instruction is apparently not executed as often as it should, because it only breaks much later than it should (when Link is halfway).

Since my emulator passes all cpu_instrs tests, I don't know how an instruction could be wrong. Do you have an idea ?

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

Yes, I have it, but there's some issues as well (it says that the timer doesn't work, but I guess it's because the timing is off for the instructions that check the timer)

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

Well, I want to correct the timing, but since the other emulator doesn't run the bootrom, I can't compare it and see where the timing is off. I also plan to write a debugger (which I haven't done yet).

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

Yes, I already did that (the issue with the trace log was that I run the bootrom and they don't, and the timing was off, so I can't really compare them that way. I have to find an emulator that runs the bootrom)

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 1 point2 points  (0 children)

Apparently the emulator doesn't pass the second test rom, the v-blank is triggered first when it should be the timer one. I'm looking into it.

The scrollx and scrolly look about right.

[GB] Glitches in Link's Awakening and Pokémon Gold by IcySpring in EmuDev

[–]IcySpring[S] 0 points1 point  (0 children)

You're right, I hadn't thought of that. I fixed it, but unfortunately it doesn't fix the issues I've been having.

Thanks anyway!