Poster | Thread |
bison
 |  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 19-Apr-2022 15:23:59
| | [ #41 ] |
|
|
 |
Elite Member  |
Joined: 18-Dec-2007 Posts: 2112
From: N-Space | | |
|
| |
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 19-Apr-2022 17:15:55
| | [ #42 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| |
Status: Offline |
|
|
Hypex
 |  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 27-Apr-2022 18:17:00
| | [ #43 ] |
|
|
 |
Elite Member  |
Joined: 6-May-2007 Posts: 10933
From: Greensborough, Australia | | |
|
| @Karlos
Quote:
Instructions such as MOVEBE means you have to do load/store for everything though, rather than being able to take advantage of the CISC nature of the architecture. In practise this still means more instructions and more pressure on available registers to operate in big endian than the same operations in little. And to leverage this at all, you're probably going to have to resort to assembler as there's no easy way to express that you are doing endian conversion in idiomatic C. Clever compilers can see a sequence of shifts and rotates and recognise that it's a bswap and some may even detect the usecase movebe. But, more likely, you'll end up either using compiler builtins, inline assembler or just assembler sources in conjunction with the your C code. |
Compiler built ins are useful though not exactly portable. However I don't see a problem with MOVEBE being a RISC like load/store only, since it's for a specific operation and not supporting all addressing modes. If you look at BSWAP it has to operate in a register. So it would need reading into a register and then BSWAP called. MOVEBE combines this into one instruction. In any case, if any real work is done, it will be in registers.
It's better than what PPC has with reverse loads, even though it works the same, because compiler built ins aren't optimised for registers. They are designed to operate on a variable. Which is also silly since you need to read or write to memory. But the GCC macros I checked out only took a value and not an address. Therefore, on x86 this will become a read, then a BSWAP. On PPC, this will become a total mess, with all this code swapping bytes. It's somewhat irrelevant that 68K, which had no codes to do it, can do it in three with a roll, swap, roll. But on PPC, the asm of the built in will load into a register and then need to manually swap it all around. This is ridiculous really because one instruction would read it directly in reverse order. The macro really isn't optimsed for PPC so it comes off as looking crap when it can do better. Perhaps assembly is the only way.
Quote:
I agree that there's no universal rightness or wrongness to the endian debate. In my view, big endian is much more natural based on how humans understand numbers of different magnitudes. Nevertheless, that human intuition applied to silicon circuitry is perhaps "carbon privilege". In the end, it's all just encoding. I've no doubt that machines natively big or little by heritage have optimised their access and usage of data in each encoding to equal degrees. |
The benefits are likely humanised. I mean, when reading a hex dump, it's a lot easier to decipher. A little while back I was doing some software reverse engineering and mapping out data in a hex dump so I could create a C struct compatible to it. Had it been in LE order it would have done my head in. This also explains why I was confused by BMP file because the words were backwards! I had forgotton about my 6502-ish upbringing with lo byte, hi byte. 
However, there are other examples of right to left order, such as the Hebrew language. More common in times past. So humans don't always work in the same forward order. |
|
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 27-Apr-2022 19:08:43
| | [ #44 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| @Hypex
Your problem with little endian dump interpretation is why I use GHex for it rather than eyeballing text.
Quote:
However, there are other examples of right to left order, such as the Hebrew language. More common in times past. So humans don't always work in the same forward order |
Curious point. Are Arabic numbers little endian in the context of Arabic writing? They are written with the most significant digit on the left but the language is also read right to left, meaning the least significant digit should be encountered first.Last edited by Karlos on 27-Apr-2022 at 08:48 PM.
_________________ Doing stupid things for fun... |
|
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 14-Jun-2022 19:17:44
| | [ #45 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| New video up...
This doesn't really demo anything about the CPU, it's all about the "homage to COPPER" display controller
FILTHy Parallax
No virtual CPU cycles are used to create the effect. _________________ Doing stupid things for fun... |
|
Status: Offline |
|
|
kolla
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 14-Jun-2022 22:57:55
| | [ #46 ] |
|
|
 |
Elite Member  |
Joined: 21-Aug-2003 Posts: 2421
From: Trondheim, Norway | | |
|
| @Karlos
That video deserves an Oscar! _________________ B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC |
|
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 14-Jun-2022 23:08:48
| | [ #47 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| |
Status: Offline |
|
|
hardwaretech
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 5:43:48
| | [ #48 ] |
|
|
 |
Member  |
Joined: 5-May-2010 Posts: 50
From: blaine minnesota usa | | |
|
| What next? A version of geos converted X64?
|
|
Status: Offline |
|
|
cdimauro
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 6:38:55
| | [ #49 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 3097
From: Germany | | |
|
| @hardwaretech: next is an Amiga chipset with packed graphics instead of bitplanes.  |
|
Status: Offline |
|
|
Bosanac
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 8:22:46
| | [ #50 ] |
|
|
 |
Regular Member  |
Joined: 10-May-2022 Posts: 242
From: Unknown | | |
|
| |
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 9:33:03
| | [ #51 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| |
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 11:50:32
| | [ #52 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| @cdimauro
You may joke, but why not? The beauty of a virtual machine is you can do whatever you can write software for. _________________ Doing stupid things for fun... |
|
Status: Offline |
|
|
racer_hex
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 16:53:11
| | [ #53 ] |
|
|
 |
New Member |
Joined: 10-May-2022 Posts: 7
From: Unknown | | |
|
| |
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 17:13:34
| | [ #54 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 22:17:01
| | [ #55 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 3097
From: Germany | | |
|
| @Karlos
Quote:
Karlos wrote: @cdimauro
You may joke, but why not? The beauty of a virtual machine is you can do whatever you can write software for. |
No joke: I was somehow serious. 
However it'll be a huge change on your VM, which requires a lot of work. |
|
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 22:41:11
| | [ #56 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| @cdimauro
On the contrary, I don't think it would take much. The host has plenty of space to provide all kinds of fake hardware to the VM core. I'd just use something similar to the code in the gist and provide the same sort of interface I have now to the VM and the corresponding display controller logic to unpack the visible pixels to the format the native host display is using. _________________ Doing stupid things for fun... |
|
Status: Offline |
|
|
cdimauro
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 23:03:57
| | [ #57 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 3097
From: Germany | | |
|
| @Karlos: but implementing the Amiga chipset (in packed format) will require some time for sure. |
|
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 15-Jun-2022 23:05:16
| | [ #58 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| @cdimauro
Well, that's different. I was just going for a straight implementation not based on anything specific. _________________ Doing stupid things for fun... |
|
Status: Offline |
|
|
cdimauro
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 16-Jun-2022 6:24:06
| | [ #59 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 3097
From: Germany | | |
|
| @Karlos: so, not an Amiga chipset, but something different. Then it'll take much less. |
|
Status: Offline |
|
|
Karlos
|  |
Re: MC64K - Imaginary 64-bit 680x0 Posted on 16-Jun-2022 10:38:15
| | [ #60 ] |
|
|
 |
Elite Member  |
Joined: 24-Aug-2003 Posts: 3516
From: As-sassin-aaate! As-sassin-aaate! Ooh! We forgot the ammunition! | | |
|
| |
Status: Offline |
|
|