Hi, im doing some basic tests, using guides from Bigevilcorp, and other sources.
My test is doing well both in the emulator and real hardware (using sega nomad and UMDK to test), but the ram keeps geting filled until it runs out of space, i've tried to find the cause with REGEN debugger, but i dont get it, I thinks its something with Vint countercan someone take a look? I've attached rom and source. Also a screen:
Thanks in advance.
Memory leak? Need some help -_-
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 115
- Joined: Fri Sep 18, 2015 2:56 pm
Memory leak? Need some help -_-
- Attachments
-
- ScrollTests.7z
- (55.24 KiB) Downloaded 217 times
-
- Very interested
- Posts: 209
- Joined: Sat Sep 08, 2012 10:41 am
- Contact:
Re: Memory leak? Need some help -_-
You're using BSR for an infinite loop with no RTS - BSR will push the return address to the stack, and since you never return, it'll fill memory up with these addresses forever:
Use BRA if you never intend to return from the subroutine.
Code: Select all
bsr @Loopie
A blog of my Megadrive programming adventures: http://www.bigevilcorporation.co.uk
-
- Very interested
- Posts: 115
- Joined: Fri Sep 18, 2015 2:56 pm
Re: Memory leak? Need some help -_-
Wow that was fast, and yes, solved!
Definetly i have to learn much more about OPCODES,
Definetly i have to learn much more about OPCODES,