Looking for a program/game that does't require any zx81rom routines.

Discussion about ZX80 / ZX81 Software
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Looking for a program/game that does't require any zx81rom routines.

Post by xubuntu »

Hi

I am looking for a program or game in assembly (I want the source code) for the zx81 that doesn't require the main zx81 rom to run.

Which means, that one could either flash it on an EPROM at address 0 and it will automatically start when the machine initializes.

Or, one could assemble the code, load the block in memory location decimal 17000 for example, using the eighty one emulator, and then J :17000 (but I think here you need to use the hex equivalent of 17000 for the jump) using the ASZMIC... WITHOUT the usage of the routines of the ASZMIC rom!

And then I have a few more questions.

I have in my hands a game written in assembly, and in the beginning, the code has some "includes" of the main rom for example:

Code: Select all

#include "zx81defs.asm" 
#include "zx81rom.asm" 
#include "charcodes.asm" 
#include "zx81sys.asm"
Question 1: Why do we require those files when we load the program through basic using the REM command, since the basic rom is ALREADY in memory !? Why do we have to require those files a second time when we have the original zx81rom installed!?

Question 2: Why do we still need the main zx81 rom in order to run the program!? I tried to run the program with ASZMIC but obviously it still needs the basic zx81 rom loaded on the first 4K of memory. But at the same time, it also requires "includes" at the beginning of the code !!!

Could someone explain and, hopefully, provide a code, even a HELLO WORLD program in assembly, that DOES NOT require any zx81rom routines or ASZMIC routines and can be written directly to memory location 0000 and run!?

Thank you in advance.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Looking for a program/game that does't require any zx81rom routines.

Post by 1024MAK »

Well, for starters, the pixel data for the normal character set is in the BASIC ROM. So if you are not going to have that, your assembly code must do that itself. Same for the code for the display routine (assuming you want to use a video display).

To see why extra files are included, you need to see what is in them. Some are just a list of addresses in memory for routines or system variable locations.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Looking for a program/game that does't require any zx81rom routines.

Post by dr beep »

Impossible since the non maskable intrupt is handled by the ROM.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Looking for a program/game that does't require any zx81rom routines.

Post by xubuntu »

Ok then let's start backwards.

We could start deleting things from the original zx81 rom till we reach a point where we are left with only the absolute vital part with which we could print characters on the screen. That means, delete all the commands and just be able to print characters on the screen freely.

So I found the assembly code of the zx81 basic rom on the internet, which seems to assemble with 0 faults using tasm, and yet, it doesn't initialize on the emulator.

Is perhaps something wrong with my assembled bin file ? :?
Attachments
zx81.asm
source code
(372.66 KiB) Downloaded 57 times
zx81.bin.txt
assembled with tasm
(9.02 KiB) Downloaded 55 times
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Looking for a program/game that does't require any zx81rom routines.

Post by dr beep »

xubuntu wrote: Wed Mar 15, 2023 8:07 am We could start deleting things from the original zx81 rom till we reach a point where we are left with only the absolute vital part with which we could print characters on the screen.
That vital part holds much more than just print.
How do you analyze your BASIC code?
How do you know where to start your code?
How do you load your RAM-code?

Only way you could make anything run is by replacing the ROM with only your code that starts after setup.
And what is your base setup? A full screen with 32 spaces per line and 25 linefeed?
Fixed? possible, but then you also need to change the displayroutine where dfile is tken from sysvar.

How do want to read the keyboard? By ROM-routine? or only with your own IN-reads?

I really can't find a good reason why you want to alter the ROM in so many places, but that I hav mentioned before.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Looking for a program/game that does't require any zx81rom routines.

Post by xubuntu »

What i want is just some characters on the screen without the usage of the main rom.

After 40 years of development, none has ever created a game, a program, or even a text printed on the screen without the usage of the main rom.

And if someone thinks "well there was no need for that", the answer is "well there is no need for gurmet cousine either, we could eat rice every day".
dr beep
Posts: 2076
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Looking for a program/game that does't require any zx81rom routines.

Post by dr beep »

writing a character to the screen without the ROM is easy, but the ROM will always send the screen to the tv.

Example to write a 0 to first position on screen (assuming) screen has room on that line

ld hl,(dfile)
inc hl
ld (hl),28
ret
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Looking for a program/game that does't require any zx81rom routines.

Post by xubuntu »

You talk with riddles, old wise guru.

What means, "the character will show on screen but not on tv " ?

First of all, I have my zx81 moded for composite and I use a contemporary monitor.

Is there a way to see characters on my contemporary monitor without the basic rom yes or no ?
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Looking for a program/game that does't require any zx81rom routines.

Post by 1024MAK »

Yes and no.

The BASIC ROM is part of the video display system. So without it, you need your own video display driver. Without this, there is no effective video output.

The BASIC ROM as I said earlier, also contains the pixel data for the character set.

The BASIC ROM also has the routines to “print” text to the video display file. It’s this video display file that the video display driver processes to generate the video / TV display output.

So if someone writes suitable assembly language machine code routines that can do all of the above, you don’t need the BASIC ROM. However, that is a lot of work. Because the BASIC ROM came as standard, the vast majority of programmers did not need to write their own code to do all of the above. And even if they did do some of the work, it’s tied extremely closely to the game code.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
xubuntu
Posts: 84
Joined: Sat Jun 18, 2022 12:42 pm
Location: Athens, GR

Re: Looking for a program/game that does't require any zx81rom routines.

Post by xubuntu »

Bullshit. I have a game in my hands, as I mentioned, written in assembly and it has all those necessary files #includes in the beginning and at the end of the game. It has the system variables, characters, visuals, and all those things you mentioned. AND YET....... the game won't initialize without the basic rom. And I don't see a reason for the game to have those #includes since they are located also in the basic rom. For some reason the game needs both those files attached and the basic rom. If things were as simple as you say, we would be able to find a game that has all those necessities included. But we can't find such game on the internet.
Post Reply