Overview Features Instructions Performance Forum Downloads Products OrderV4 Reseller Contact

Welcome to the Apollo Forum

This forum is for people interested in the APOLLO CPU.
Please read the forum usage manual.



All TopicsNewsPerformanceGamesDemosApolloVampireAROSWorkbenchATARIReleases
Information about the Apollo CPU and FPU.

Writing 3D Engine for 68080 In ASMpage  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 

Gunnar von Boehn
(Apollo Team Member)
Posts 4795
12 Feb 2020 10:47


Vladimir Repcak wrote:

EU V4 PowerPlug  : Input (100V-240V : 0.5A)  Output (5V, 2A)
US CellPhone Plug: Input (100V-240V : 0.3A)  Output (5V, 2000 mA)
 
The only difference appears to be in Input : 0.5A (EU) vs 0.3A (US).
Can I use the U.S. cellphone plug or would that (0.5A vs 0.3A) destroy V4 ?

Regarding Output : 2A == 2000mA  -- So this is the same

What is important is that
the Output is V=5.0  or V=5.1
with at least 0.5 Amp, better is more e.g. 2 A


Vladimir Repcak

Posts 327
12 Feb 2020 11:24


So, the input difference (0.5A on EU one) versus (0.3A on US cell phone charger) is irrelevant ? I honestly don't understand that bit.

Meaning, explicitly, I can safely use that U.S. cell phone charger I have ?

Reason I ask is that lost of old gaming consoles were destroyed by using a wrong power adapter and while V4 is certainly built using modern-era components, a wrong voltage/amperage can always kill a board...


Gunnar von Boehn
(Apollo Team Member)
Posts 4795
12 Feb 2020 11:44


Vladimir Repcak wrote:

V4 is certainly built using modern-era components, a wrong voltage/amperage can always kill a board...

What is important is that you have 5.0V or 5.1V on the output.
With minimum 0.5A better more like 1.0A or 2.0A.
You can even have 3A or 5A as more does never hurt.
 
 


Samuel Devulder

Posts 246
12 Feb 2020 12:08


Vladimir Repcak wrote:

  I don't think I understand what you mean by your last paragraph. Would I have to implement an SDL layer ?

I just meant that it is possible to write code that works fine on standard amiga, and super-fast on the vamp using the extra resources it has like SAGA-registers making it easy to switch screen buffers or AMMX instructions that speed up gfx rendering and memory ops (like STOREC, STOREM), etc. (see EXTERNAL LINK or EXTERNAL LINK )
  I am currently running my code within UAE, the code is targeting 040 instruction set and CGX.

Experiment tend to show that 030 instruction set is the one that works the best for the vamp. Arczi told me that when compiling support library for 030 in place of 040 made diablo raise from 50+fps in town (probably on v4) to 60fps. That's a nice speedup considering that it is only a compiler switch. Actually the apollo core implements the 030 ISA in the most efficient way of all other 68k ever I suppose (especially bitfields).
 


Gunnar von Boehn
(Apollo Team Member)
Posts 4795
12 Feb 2020 12:31


Samuel Devulder wrote:

  Experiment tend to show that 030 instruction set is the one that works the best for the vamp. Arczi told me that when compiling support library for 030 in place of 040 made diablo raise from 50+fps in town (probably on v4) to 60fps. 
 

 
68030 and 68040 have the same instruction set.
 
From performance point of view, the 68030 is much slower than the 68040 and this especially on longer instructions.
Both the 68040 and 68080 are fast also on longer instructions, therefore avoiding a longer instruction make NO sense on them.
 
I think what you might have measured is simply that same versions of GCC have bad/broken performance judgment and do simply very stupid things. We witnessed this before with bad assumptions of GCC replacing 1 MUL with 20 ADD - because it wrongly assumed the 20 ADD being faster on 68040. But this only shows that GCC has room for improvement - and does not affect Vlad.
 
Vlad you do code this in ASM right?

As general coding advices and guidelines we can give:
1) Be not afraid to use long instructions.
MOVE.L #123456,D0 is as fast as MOVEQ #1,D0
2) Ideally mix independant instructions.
ADDQ.L #1,D0
ADDQ.L #1,D1
ADDQ.L #1,D0
ADDQ.L #1,D1
ADDQ.L #1,D0
ADDQ.L #1,D1

is faster than

ADDQ.L #1,D0
ADDQ.L #1,D0
ADDQ.L #1,D0
ADDQ.L #1,D1
ADDQ.L #1,D1
ADDQ.L #1,D1



Vladimir Repcak

Posts 327
12 Feb 2020 12:55


Gunnar von Boehn wrote:

Vladimir Repcak wrote:

  V4 is certainly built using modern-era components, a wrong voltage/amperage can always kill a board...
 

  What is important is that you have 5.0V or 5.1V on the output.
  With minimum 0.5A better more like 1.0A or 2.0A.
  You can even have 3A or 5A as more does never hurt.
 
 

Alright, so I turned it on and it survived :)

It's connected to my 32" LCD that I used for Jaguar. I need to buy a bigger table - I can't fit anything bigger than 32 next to the primary 50" TV that I use as a monitor.

I was worried how would I boot it up after seeing so many issues from other people, but I guess you guys configured some default resolution that works at most TVs ? My TV says it's 576p, either way I am very happy I didn't have to troubleshoot it remotely :)

I have this warm and fuzzy feeling now, playing with various demos, that I didn't think I would experience ever again :)


Vladimir Repcak

Posts 327
12 Feb 2020 13:04


Gunnar von Boehn wrote:

 
  68030 and 68040 have the same instruction set.
 
  From performance point of view, the 68030 is much slower than the 68040 and this especially on longer instructions.
  Both the 68040 and 68080 are fast also on longer instructions, therefore avoiding a longer instruction make NO sense on them.
 
  I think what you might have measured is simply that same versions of GCC have bad/broken performance judgment and do simply very stupid things. We witnessed this before with bad assumptions of GCC replacing 1 MUL with 20 ADD - because it wrongly assumed the 20 ADD being faster on 68040. But this only shows that GCC has room for improvement - and does not affect Vlad.
Cool, I was really puzzled as I presumed Diablo was coded in ASM, but if it is in C, then it's high likely there's some compiler meshuggae going on :)

 
Gunnar von Boehn wrote:

  Vlad you do code this in ASM right?
Technically, it's my own language - Higgs - but basically - yeah - assembler. For example, all the floating point code I was writing recently had to be strict ASM as I don't yet have support for it in Higgs.



Andrew Miller

Posts 223
12 Feb 2020 15:15


Vladimir Repcak wrote:

This older post got buried already, so I pasted it here again:
 
  So, I finally got my V4 delivered - great timing since I just about got most of the engine ported and running under WinUAE.
  Now, before I can turn the thing on, there's a consideration about the power plug. I am in U.S., so I can't just plug the EU plug into the wall socket.
 
  I presume it should be safe to use just my regular USB charger for a cell phone ?
 
  But, there's a difference in input amperage, and I don't know if that difference won't burn my V4. Definitely preferable to be safe than sorry.
 
  EU V4 PowerPlug  : Input (100V-240V : 0.5A)  Output (5V, 2A)
  US CellPhone Plug: Input (100V-240V : 0.3A)  Output (5V, 2000 mA)
 
  The only difference appears to be in Input : 0.5A (EU) vs 0.3A (US).
 
  Can I use the U.S. cellphone plug or would that (0.5A vs 0.3A) destroy V4 ?
 

As long as the output is 5V and at least 2A its fine. Voltage is the 'force' and the A is the capacity, 2000mA = 2A.
Your cellphone plug has the exact same output as the supplied V4 plug you have listed.
You can even use a higher current rating greater than 2A and the V4 will only take what it needs, its really just the voltage that must be correct.


Vladimir Repcak

Posts 327
12 Feb 2020 17:30


So, what exactly does the 0.3A on the input mean ?


Vladimir Repcak

Posts 327
12 Feb 2020 17:35


Anyway, other than the SD card, how do we network the V4 with PC ?

I tried connecting both using the CAT5 cable (no switch, just directly from V4 into PC) and playing with Workbench->Network and after clicking OnLine, I get the caffeine output with :
Io0: flags = 9 (UP,LOOPBACK> mtv 1536
      inet 127.0.0.1 netmask 0xff00000000
net0: flags=822 (BROADCAST,NOTRAILERS,SIMPLEX)
      inet 0.0.0.0    netmask 0xffffffff00  broadcast 0.0.0.255

My PC only sees it as an Unidentified network, but can't seem to access the properties when clicking on LocalArea Connection inside Network and Sharing Center.

Any pointers on how to network them together ? Maybe at least doing some kind of local FTP server ?


Philippe Flype
(Apollo Team Member)
Posts 281
12 Feb 2020 18:02


The embedded V4 Eth RJ45 core + driver is under development. So i doubt you it have it right now (i would be surprised, not released to public, yet). It's promising, yet working, internally in dev team. Still some works to do, though (such as Interrupt handling).


Vladimir Repcak

Posts 327
12 Feb 2020 18:24


Philippe Flype wrote:

The embedded V4 Eth RJ45 core + driver is under development. So i doubt you it have it right now (i would be surprised, not released to public, yet). It's promising, yet working, internally in dev team. Still some works to do, though (such as Interrupt handling).

Fair enough. So, what are the other (other than uploading each build manually to an SD card) options then ?


Ali B.

Posts 19
12 Feb 2020 21:10


Vladimir Repcak wrote:

So, what exactly does the 0.3A on the input mean ?

They are different switching power supplies with different values. Not every motor consumes the same amount of fuel to speed the car up to 100 km/h even though they have the same horsepower.


Samuel Devulder

Posts 246
12 Feb 2020 23:10


Gunnar von Boehn wrote:

  68030 and 68040 have the same instruction set.
   
  From performance point of view, the 68030 is much slower than the 68040 and this especially on longer instructions.

Sure! But I'm not talking about the intrinsic power of the respectives CPUs but on the speed of the gcc-generated code on the vamp when targeting various CPUs.
 
Experiments indicates that code generated by c-compilers for 030 do perform better on the vamp than when generated for 040. I've been observing this on quake with various gcc versions as well as other compilers and recently Arczi on reported the same to me with latest gcc with diablo's support libraries.
 
See for instance the following excerpt of my old quake benchmark where asm optims was to quite present (so it is almost pure C):
quake.sasc.040 1.01.build#1589 (08/08/2018)
  969 frames 41.92 seconds 23.12 fps
 
  quake.sasc.030 1.01.build#1588 (08/08/2018)
  969 frames 41.84 seconds 23.16 fps
 
  quake.gcc-6.4.1b.040 1.01.build#1583 (08/08/2018)
  969 frames 40.12 seconds 24.15 fps
 
  quake.gcc-3.2.2.040 1.01.build#1595 (08/09/2018)
  969 frames 40.00 seconds 24.22 fps
 
  quake.gcc-2.95.3.040 1.01.build#1592 (08/08/2018)
  969 frames 39.93 seconds 24.27 fps
 
  quake.gcc-3.2.2.030 1.01.build#1594 (08/09/2018)
  969 frames 39.69 seconds 24.41 fps
 
  quake.gcc-6.4.1b.030 1.01.build#1582 (08/08/2018)
  969 frames 39.68 seconds 24.42 fps
 
  quake.vbcc.040 1.01.build#1586 (08/08/2018)
  969 frames 39.59 seconds 24.48 fps
 
  quake.gcc-2.95.3.030 1.01.build#1591 (08/08/2018)
  969 frames 39.45 seconds 24.56 fps
 
  quake.vbcc.030 1.01.build#1585 (08/08/2018)
  969 frames 39.42 seconds 24.58 fps
 
The 040 version are always slower than the 030 for a given compiler.
 
Of course this could be some kind of gcc "bug", but then it seem to affect other independant compilers too. So there must be something that the vamp likes about 030 code generated by C compilers.
 
Or... maybe.. it is not the 030 generated-code which is pretty good, but the ones for 040 which is perticularily bad. I have a (semi) wild guess about this: at the time of gcc 2.x, amiga users (and compiler's authors/maintainers for the amiga) had better knowledge of widespread 68030 than of less frequent 68040. This kind of bias code generation in favor of the 030.
 
Now it is certain than this doesn't affect hand written asm. For instance with my latest quake, ASM opts are more present and the results are much higher (>30fps) but closer from one another because costly routines run the same vamp-optimized asm code.
 
So yeah, asm is better than C compilers yet.


Andrew Miller

Posts 223
13 Feb 2020 05:36


Vladimir Repcak wrote:

So, what exactly does the 0.3A on the input mean ?

0.3A is what the mains is supplying at whatever voltage. This is converted to the correct voltage and current available by the eu/v4 power supply. In general mains is transmitted at higher voltage and lower current as this results in less loss over the power lines. Once at the mains/ device it is then converted. Oversimplified you convert high voltage low current to low voltage, high current.


Vladimir Repcak

Posts 327
13 Feb 2020 09:47


Andrew Miller wrote:

Vladimir Repcak wrote:

  So, what exactly does the 0.3A on the input mean ?
 

 
  0.3A is what the mains is supplying at whatever voltage. This is converted to the correct voltage and current available by the eu/v4 power supply. In general mains is transmitted at higher voltage and lower current as this results in less loss over the power lines. Once at the mains/ device it is then converted. Oversimplified you convert high voltage low current to low voltage, high current.

Thanks. For whatever reason I remembered that there's 12 A in the wall socket, so 0.3 seemed very low :)



Vladimir Repcak

Posts 327
13 Feb 2020 09:50


Alright, let's try to figure out how to deploy 100+ builds per day from PC to V4.

Is serial connection an option?


Martin White

Posts 85
13 Feb 2020 12:40


Not that I'm aware of. You need an ethernet module:
https://wiki.apollo-accelerators.com/doku.php/vampire:vsa-v4:ethernet
 
Happy to hear if there are any slicker ways of doing this because SMB is very unreliable on V4SA so i use FTP and it goes something like this:
 
  - Build on PC / Mac
  - Copy to network folder that is mapped to FTP server
  - On V4SA enable network
  - On V4 start FTP
  - Download build
  - Disable network
  - test
  - rinse and repeat
 
It's pretty tedious even with a network module. Stopping and starting the network seems to be required as it's not desperately reliable. You may get away without i suppose. I don't really know how to make it any slicker since it would be like that whether it was the Vampire or any other device. I'm not sure that serial would make it any better - I suppose it might.


Stefano Briccolani

Posts 487
13 Feb 2020 15:46


I don't know if it's the best solution of all, but I use the gdrive/Dropbox handlers to exchange data from pc/smartphone to amiga
EXTERNAL LINK 


Martin White

Posts 85
13 Feb 2020 15:51


That looks really useful and yes, would do the job even in read-only mode without the license. I could have sworn I tried it early on and something didn't work but clearly I should re-visit that. Thanks.

posts 426page  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22