Jump to content
IGNORED

More weird stuff


42bs

Recommended Posts

I have an algo which I prototyped in Processing and ported to GPU.

Below three pictures are the same algo. Weird: VJ looks more or less identical, but running on real HW looks completely different?

Processing:

tmpl_processing.thumb.png.aa4224365efdff7179b346ab373574dd.png

 

VirtualJaguar

tmpl_vj.thumb.png.ed3186389f1d248647c0cf8896341973.png

 

The real thing (TM):

tmpl_jag.thumb.jpg.277b45a33246b79d2dea16ca5d439720.jpg

Link to comment
Share on other sites

8 hours ago, 42bs said:

I have an algo which I prototyped in Processing and ported to GPU.

Below three pictures are the same algo. Weird: VJ looks more or less identical, but running on real HW looks completely different?

Processing:

tmpl_processing.thumb.png.aa4224365efdff7179b346ab373574dd.png

 

VirtualJaguar

tmpl_vj.thumb.png.ed3186389f1d248647c0cf8896341973.png

 

The real thing (TM):

tmpl_jag.thumb.jpg.277b45a33246b79d2dea16ca5d439720.jpg

 

Q1: What does input to the algorithm look like?

Q2: What is algorithm supposed to do?

Q3: The slanted horizontal(ish) line (below numbers) in The Real Thing is just an optical illusion created by snapping photo of tv/monitor at an angle, correct?

Link to comment
Share on other sites

It is going to be a new demo for Sillyventure, so I will not disclose yet much.

So much: The algo creates this image by doing simple adds, subs and shifts.

Regarding Q3, it is not optical illusion, the picture generated on the Jaguar really looks completely different and has this horizontal line.

 

Link to comment
Share on other sites

25 minutes ago, Zerosquare said:

Have you double-checked that all memory is initialized?

Yes. I even changed it from zeroing to some other value.

Normally I use the blitter to clear memory, so switched to 68k loop.

 

Last what I did not yet check is, to remove the IRQ code from GPU and move OBL update back to the 68k.

Link to comment
Share on other sites

This code behaves differently on VJ than on HW:

	add	x,tmp0
	add	y,tmp1
	and	mask,tmp0
	and	mask,tmp1
	add	map_base,tmp0
	shlq	#10,tmp1
	add	tmp0,tmp1
	jump	(LR)
	loadb	(tmp1),r0

This subroutine is called about 200k times but only one call makes the problems where tmp0 and tmp1 are both zero?!

mask is 1023, x/y range from 0 to 1023+delta.

  • Like 1
Link to comment
Share on other sites

Ok, again a pipeline/score board issue :(

Original code:

	moveq	#0,tmp0
	moveq	#0,tmp1
	BL	(GET_H)
	move	r1,ptr0

	move	step,r0

GET_H is above subroutine which read r0. But only once in the loop, r0 is not used, GET_H is only used to get the pointer into tmp1/r1.

The following "move step,r0" ends _before_ the "loadb" and therefore r0 gets overwritten by the memory contents (which is 0).

 

I really should make MACROs for load which just writes the loaded value to some dummy register.

Edited by 42bs
  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...

Maybe also change the coding style? Cyclomatic complexity is evil, even though branches seem to be cheap on JRISC. Immutable variables are best. We have 64 registers on the Jag. So it should be possible not to reuse them too often. Anyway, no I learned: SRAM seems to be fast, but it is not guaranteed to. So better try to cram everything into registers and sadly reuse them or even pack data.

  • Confused 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...