jdah / jdh-8

An 8-bit minicomputer with a fully custom architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDL bug? or did I miss something?

leuat opened this issue · comments

What a wonderful project!

compiled, assembled pong/holiday, but nothing shows up on screen. Did I miss anything on how you're supposed to load an run programs?

Screenshot 2021-12-27 at 19 17 21

all I get is a blank screen, sometimes an error about writing to 0x0000. PC correctly at 0c000 and step correctly iterates through the code.

commented

Please checkout the README.md, you're running at 1 Hz with run 1. Try run realtime or run 1000000000.

Uploading Screenshot 2021-12-27 at 19.43.12.png…

Ah thanks for the clarification! Still no luck, though.. is

./bin/emu -m screen -m kb --load pong.bin 0xC000

the correct syntax to start the program? if it is, then I suspect that there might be some apple M1 stuff going on

commented

Ah you're missing the os :-) sorry for the lack of guidance. You also need to assemble os/ostext.asm and load it (you can use --load multiple times) at 0x0000.

hehe thanks for replying =) yeah I just need to get it working once and then I'll stop nagging you...

I suspected an OS (since you had OS calls), so closer - but still no cigar.

./bin/emu -m screen -m kb --load os.bin 0x0000 --load holidal.bin 0xC000 -r 0xC000

is this the correct syntax? Still only get a blank screen with lots of incorrect writes:

Read/write attempt for non-present bank 0x0001
Read/write attempt for non-present bank 0x0001

Like, should the os be executed first? Do I manually need to set the PC ? (poke 0xFFFF 0xC0 etc) before running?

again, sorry for all the questions, feel free to ignore me until you're up for it!

I got pong working by
./bin/emu -m screen -m kb --load os.bin 0x0000 --load pong.bin 0xC000
poke 0xFFFF 0xC0
run realtime

it displays the playfield + players but crashes kinda instantly (by clearing the screen slowly)

I'm unable to get the other examples (demo / holiday) working, all black screen with incorrect rom writes (Attempt to write to ROM at [0x07F1] (pc=[0x01B1]) etc)

question: Would it be possible to add support for auto-running at a specific location in memory? As right now, having to manually set the PC in the monitor is .. not really something that the user should be bothered with. TRSE is supposed to be able to execute programs without the user having to go through any manual labour on each build.

How about adding a PC value to the "--run" command? "Run realtime 0xC000" and "--run realtime 0xc000" from command line?

commented

No worries, looking more at the repo it's actually in a bad state and needs to be fixed, so will get to that when I have the time.

In the meantime, os/os.asm needs to be edited to actually jump to ADDR_RAM (0xC000) to start executing the pong program. Right now it's full of garbage test code, sorry about that.

EDIT: so if you just edit osmain: to contain a jmp [ADDR_RAM] it should properly get to the binary loaded at 0xC000 :-)