Pacific, my entry to MSX Dev 2020

Page 2/2
1 |

By Grauw

Ascended (9156)

Grauw's picture

30-07-2020, 00:14

How much RAM do you need?

By albs_br

Resident (64)

albs_br's picture

30-07-2020, 00:23

Currently I'm only using around 2,5k but what if I need the full 16kb?
I know I can use ORG 0xE000 and it will run on any machine.

By ducasp

Champion (315)

ducasp's picture

30-07-2020, 00:52

albs_br wrote:
Grauw wrote:

FC48H BOTTOM Address of the beginning of the available RAM area.
FC4AH HIMEM Address of the end of the available RAM area.

I had seen it before, but is not possible to use it in the ORG directive. It would be needed a completely different approach. That's my doubt.

Yeah, understand that, that will depend upon how you use RAM and how critical its performance is...

My suggestion would be that if you know you are not going to need more, the ORG approach for 8KB is the best one, work on any machine... If somehow you think in the future you are going to need more memory, then the best approach would be to use get your code to load BOTTOM in HL or IX or IY and move from there (i.e.: tables, load bottom, dynamic tiles, load bottom and add 0x0100 and it is the address, etc). It won't be as fast and probably you will lose some performance there as you can't reference to individual bytes like you can easily with fixed addressing, so you will always have to use a reference and add an index....

Another possibility would be to have the part of the code that get and store data in RAM, loaded in RAM, so at start-up you load your routines starting at bottom, and then your code will dinamically change the addresses in the routines in RAM, so you will use indexing only at this point, and once loaded and the code in ram changed with the new pointers, your are good to go....

But to be honest, I think that both approaches are not really good... Either you can live with the free ram in a 8KB machine and just use org from there, or you can't... If you try to keep a version that can use more ram or less ram, that will be a lot of trouble, and not sure if it is worth the extra work to get it done (sorry for all owners of machines that have 8KB ram and don't have any other option, if there are such persons... Tongue )

By Grauw

Ascended (9156)

Grauw's picture

30-07-2020, 12:36

I would just start at 0C000H then. 8k machines are a rare exception and no owner will expect it to be able to run a lot of games.

By Thom

Hero (625)

Thom's picture

30-07-2020, 15:22

I think you're fine according to the MSXdev'20 rules:

Quote:

All the games should be 100% compatible with this MSX configuration, which is defined as follows:

CPU: Zilog Z80 running at 3.58 Mhz
VDP: TMS9918/TMS9928 or compatible video processor
PSG: AY-3-8910 or compatible sound chip
Cassette interface: 1200/2400 baud
RAM: 16 KB (non memory-mapped)
VRAM: 16 KB
Therefore, the games will be tested and evaluated using this configuration. Other compatibility tests will be performed on different configurations, including a wide array of different MSX, MSX2, MSX2+ and Turbo-R computers. The games should work perfectly on any MSX compliant machine with the amount of RAM needed to run the game. If a game does not run properly on all MSX computers with at least 16 KB RAM it could be disqualified by the organization.

So don't worry about the PV-7 Smile

By albs_br

Resident (64)

albs_br's picture

30-07-2020, 17:52

v.1.2.0 already sent to MSX Dev Team:
- player able to shot 3 shots per time
- game now runs on 8kb machines, such as the Casio PV-7
Available on git hub for download.

By albs_br

Resident (64)

albs_br's picture

01-08-2020, 19:09

Update on this subject. I changed the RAM to 0xE000 and the game stoped working on some real machines (Sharp Hotbit and Panasonic WSX) with some SD Mappers (Tecnobytes).

Changed it back to 0xC000. No more support for 8kb machines, unfortunally.

By ducasp

Champion (315)

ducasp's picture

01-08-2020, 19:24

albs_br wrote:

Update on this subject. I changed the RAM to 0xE000 and the game stoped working on some real machines (Sharp Hotbit and Panasonic WSX) with some SD Mappers (Tecnobytes).

Changed it back to 0xC000. No more support for 8kb machines, unfortunally.

It is very likely that the disk interface is loading before the cartridge and allocating memory for it, thus, reducing the size of the RAM available in page 3 (counting from 0 to 3) and the remaining ram not being enough for your game ram and stack needs...

By albs_br

Resident (64)

albs_br's picture

01-08-2020, 23:17

I don't know, my use of RAM is very few bytes: 1600 bytes for level data (unnecessary, it would be read right from ROM), 128 bytes for sprite attributes buffer, and a few dozen bytes for other variables.
Almost nothing, even 8kb of RAM would fit perfectly.

Page 2/2
1 |