Yeah, in theory you can use the unused bits of the display memory for other things, but because the display storage isn't entirely linear it's takes a bit of effort to figure out where the "holes" are. I'd stick to a 16K display to start with. No point overcomplicating things to begin with.
that was mostly by curiousity! (and the excitement on seeing stuff working! )
and yes, it's quite interesting "gymnastic" to figure out how this whole paging system works!
As it stands, your memory map looks a bit like this:
&0000 - &3fff - ROM (writes will go to the underlying RAM page though)
&4000 - &7fff - ASIC registers
&8000 - &bfff - RAM (with the stack at the top end)
&c000 - &ffff - Screen RAM
thanks!
So, as you can see any write to say &6400 will write into the ASIC and change the palette. Normally you'd not leave the ASIC paged in, so that the RAM there is usable to. And you just switch it in and out when you're actually making changes to the registers.
my concern mostly was that i might need between &0000 and &7FFF for rom
The Plus can support a maximum of 512k cartridge ROM, split into 16K chunks. The first 8 of which can paged in at &0000 or &c000, the rest can all be paged in at &c000. No existing cartridges are actually that large however.
my first curiousity about "large" rom files was for testing stuff like ZX BASIC:Released Programs - MSX - BorielWiki - that is a slideshow (106kb each picture, 256x424 in yjk colour format, uncompressed) filling whole 4mb of a memory-paged rom using ascii16k paging system - this was a kind of previous level of a picture-based game ( a bit like ZX BASIC:Released Programs - BorielWiki ) that i want to have similar stuff for gx4000
Reading the keyboard/joystick is a bit of a pain on the CPC/GX, because it all involves a slightly convoluted mapping via the PPI. You should be able to get by with a generic routine though (I'm sure there is one around here). On the GX you only need worry about the joysticks and the P key, which is what the pause button maps to.
thanks for confirming how painful it is! - i actually will have to put some hands on it soon, try to transform what is available in the wiki in a kind of library (like those i started in the last attachment i added here in this thread)
@nitrofurano:
I like what you are doing. I like that you are investigating the gx4000, cartridges and writing code using zxbasic. I think it's a good plan and I look forward to seeing the results of your work.
Keep going.
thanks!
there are, mainly, for 2 purposes, that i'm attempting this:
- i want to help zxbasic becoming a far more popular tool that it is, try to extend it to the most wide range of z80-based existing hardware (even those most obscure from eastern Europe), and sharing the idea of how simple can be creating stuff with that.
- it is sad seeing a console like GX4000 almost abandoned in the scene because the lack of "classical" titles, when the homebrew scene can help a lot on "fixing" this situation, and from my humble part trying to contribute on it.
The next step will be CPC (the whole range besides GX4000), PCW, etc. - but i really wanted to focus on GX4000 first because of the second purpose i cited above
Myself I work with either assembler (I use pasmo) or C (I use sdcc).
As you can see from the forum we are all willing to help!
thanks!