merthsoft wrote:
Eeems wrote:
For some reason it's erroring for no reason
Wait... What?
Haha, good catch. Is all of this working now, Eeems?
Lol, yes it's all working great now Smile
Eeems wrote:
0x5, yes it's all working great now Smile
Glad to hear it; please continue to post any questions that you may have. I also look forward to a Your Projects topic about this when you're ready. Smile
Project topic is up Smile
I was wondering if anybody could find some optimizations for the code that I posted here: http://ourl.ca/8650
If you can, that would be great thanks Smile

Code:
   ld a,6               ;set
   ld (penCol),a         ;x and
   ld (penRow),a         ;y loc
can instead be: ld hl,(6*256)+6 \ ld (pencol),hl. Saves you 8->6 = 2 bytes. Another thing: ld a,(hl) \ ld b,a can just be ld b,(hl). You can load to a b c d e h l from (hl). That's all I see at a first glance; I'll have to look more tomorrow.
Ah ok, thanks!
Sometimes I forget that x.x I got this weird idea in my head about the privileged a/hl registers early on, and it's hard to relearn >.<
Eeems wrote:
Ah ok, thanks!
Sometimes I forget that x.x I got this weird idea in my head about the privileged a/hl registers early on, and it's hard to relearn >.<
Which weird idea is that? Perhaps you're thinking of de? There's no such thing as ld b,(de), for example, as you probably know.
no it was that anything other then an 8bit register can't load into anything other then a (of the 8bit registers). same with hl, but for 16bit registers
Eeems wrote:
no it was that anything other then an 8bit register can't load into anything other then a (of the 8bit registers). same with hl, but for 16bit registers
Ah, gotcha. That's not the case, luckily for us and our sanity. Smile
Yeah I know >.<
Hopefully I can break that old habit soon
Ok, so my maps are currently 32*32 tiles big, thus they expand out to 1024 bytes after decompression (I'm using pucrunch for compression). Now I need some place to store the decompressed maps, I know that the biggest saferam is saferam1, but it is only 768 bytes big, what would be my best bet for getting a 1024 chunk of memory? Should I create a temporary appvar or something?

EDIT: So DrDnar suggested on IRC using 8000h (ramdata or appdata, not sure which) and then running bcall 5011h (_FillBasePageTable) before exiting. So far it seems to works, everything runs fine, and when I exit to DCS, no crashes or anything, same with quitting to the homescreen. So I'm pretty sure everything is good Smile
That sounds about right; that's $8000 through $83FF. Glad that's working for you, and I hope it's as non-crashy as you report. I'm not sure what would happen if you call MOS or DCS routines in DCS with that used, though; have you tried?
Most of my non-clipped sprite routines are DCS, but no issue so far Smile
Eeems wrote:
[. . .]
EDIT: So DrDnar suggested on IRC using 8000h (ramdata or appdata, not sure which) and then running bcall 5011h (_FillBasePageTable) before exiting. So far it seems to works, everything runs fine, and when I exit to DCS, no crashes or anything, same with quitting to the homescreen. So I'm pretty sure everything is good Smile
I may have to use this too when I make my smooth scrolling tilemapper Very Happy Thanks for sharing the method.
Eeems wrote:
Most of my non-clipped sprite routines are DCS, but no issue so far Smile
Oh goodie. Smile I'd expect iPutSprite and iLargeSprite to behave, since they're Page 0 routines, but I'm a little concerned about other things; hopefully they're ok too. I'll probably have to do some experimentation of my own with the AppBasePage area at some point.
Ah ok. Oh, I use Fastcopys too, still no issues.
What's this tilemapper for player?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement