Page 1 of 1

Where to start for application programming?

Posted: Wed 01 Jul, 2009 7:58 am
by Kozak
I'm interested in fooling around with z80 again but this time I want to start making an application. Does anyone have some good pointers where to start because it's different from normal programs if I remember correctly?

Re: Where to start for application programming?

Posted: Wed 01 Jul, 2009 11:59 am
by tr1p1ea
Applications are indeed a little different in that they require a few things (specific header, paged, signed etc) but all of that can be overlooked thanks to the more modern assemblers.

Ben has BRASS and Latenite along with some app templates to make things easier. And this thread wont go long without spencers SPASM being mentioned as well, coupled with jim/spencers linker/signer wabbitsign.

Both can be used to make coding applications a sinch.

Brass+Latenite:
http://benryves.com/bin/brass/Brass.exe
http://benryves.com/bin/latenite/LATENI ... .0.6.0.zip

SPASM+wabbit:
http://group.revsoft.org/spasm.exe
http://group.revsoft.org/wabbit.zip

Re: Where to start for application programming?

Posted: Fri 03 Jul, 2009 3:28 am
by DigiTan
Yeah, just to fulfill tr1p1ea's prediction spasm makes the appsigning and whatnot pretty transparent. Just throw in an #app.inc at the start of your flash code and a validate() at the end. No hand-programming that flash header, you just hit the ground running.

Re: Where to start for application programming?

Posted: Tue 07 Jul, 2009 1:58 pm
by Batman
for app programming, don't you have to change flash pages or something to do a rom call?
i just remember reading something about it requiring you to know how to switch between ram and rom... can you also do this with an assembly program?

Re: Where to start for application programming?

Posted: Tue 07 Jul, 2009 2:21 pm
by benryves
The bcall handler is designed for that. Near the start of the application you have a table that specifies the ROM page and address of functions, and you pass an index into this table to the bcall handler.

Re: Where to start for application programming?

Posted: Mon 13 Jul, 2009 2:29 am
by Batman
interesting, so does that mean that in order to change between flash memory to (read and write) and ram, it has to be an application?
i don't understand the setup of the memory, to archive and unarchive... any links?

Re: Where to start for application programming?

Posted: Mon 13 Jul, 2009 2:39 am
by King Harold
No, the reason for it is that the application executes from the same place as that it would be changing, and there is no atomic "change page and jump" so it would go wrong in either of 2 ways:
0) it would change the page first, but then it would end up at some random location and crash
1) it would jump first? you'd need the page changing instruction right on that spot but you will probably already have other data there.
It would be like trying to change the manual that tell you how to change the manual..

But the flash.. yes.. now that is an annoying thing. Reading it is not too hard, but writing it is such a pain in the behind (even if you don't have to do crazy hacks to unlock it first) that it's rarely worth the effort.
If you just want to archive/unarchive, there are some bcalls to do that of course. (just check your copy of 83psysroutines.pdf)