630 points · by aaronbrethorst · 4y ago · 214 comments
Jez also offered this interesting BRender anecdote in an email:
When Sam Littlewood designed BRender, he didn’t write the code. And then document it.
The way most things were built at the time.
First, he wrote the manual. The full documentation
That served as the spec. Then the coding started.The starting point for BRender was a sequence of software rendering experiments that grew from 'never doing it like our hand coded asm real mode x86 renderers ever again'. There were various diversions, eg: an achingly beautiful plane sweep that only rendered the visible parts of each output scanline, whilst murdering the cache so comprehensively that there are likely still lines waiting to be filled even now. Fortunately, to get the FX Fighter team going with something stable whilst debugging continued, I knocked up a Z buffer implementation, and was given a sharp lesson on caching when it blew all the previous attempts away (notably with consistency of performance).
Arriving at this point we figured there might be a product in it and looking at our own interaction with other libraries, it was clear that a manual was key to this. If I remember correctly, the API was a negotiation between myself proposing designs, and Crosbie Fitch documenting it - pushing back with ways to make things easier to explain.
It worked out very well, and we took it into later Argonaut hardware projects. The hardware guys had enough tools to do frame capture and replay from various games/apps at a low level, so were not desperate for a full software stack. The clients had very particular views about how APIs should look, depending on planned uses, in house style, compatibility etc. We would negotiate the API documentation back and forth - including lots of sample code.
This sample code was important, (and BRender would have benefited from more of this). I took lots of real use cases, then wrote proper code to implement them against the proposed APIs and included them in the docs as tutorial and example code. Importantly - they were a representative sampling of the anticipated uses (not just the easy ones), they were not 'handwavy' and included all appropriate resource management and error handling, and they had to read well on the page. As the API negotiation continued, so the examples and tutorials got updated.
This process also had the benefit that we only started investing in client specific software development once the project had got enough momentum (typically committing hardware NRE).
These days I am always being rushed through sprints barely knowing what is going on.
What you described sounds like a wonderful way to actually engineer a great API.
Whilst the official progress is top down, the duck's feet are working hard feeling along the bottom to check for obstacles.
Just because you say you want it in 2 weeks does not make it so. Don't over promise, you will be severely disappointed. Software breaks, it does not care for deadlines.
The code was mostly C, with some protected mode x86 for inner loops. Prior to that point, all our PC games had been real mode x86- and BRender was a result of moving away from that.
a more elegant weapon, from a more civilized age, may the forth be with you ;)
Very evocative writing, I love it.
If it is, "Hello Sam!"
You start e.g. with a press release and then make your way backwards to the user stories and backlog.
It's a very useful approach to think big and focus on the problem instead of the many little issues that need to be solved.
The problem is that programming is still knowledge work. That means you can not specify everything beforehand without doing the actual work. (Like writing a novel, which can not specified before.) The solution would imho be a good balance between description the big picture/desired result (good) and spec'ing out every little detail and screen in advance (bad).
It was pitched as something like "wishful thinking programming" IIRC. First you write the highest-level "business logic" code that you want to write with made-up constructs that have no implementation, then only once you've established that it feels good to write code using those constructs do you implement them.
I remember this also being the same approach that was used in a CPU-building course I took (NAND 2 Tetris): start with the instruction set, then implement it.
Oftentimes in the book, they will write out a function with reliance on a variety of other functions that haven't been written yet, but which show a blissfully declarative outline of exactly what the function does. Then you go and write the sub-functions.
Looking at the code after is quite nice, but it takes a bit to wrap your head around writing large swaths of code that can't run -- especially when you're used to writing REPL-driven code and consistently checking/"testing" it
I think you should consider writing unit tests before coding but then delete them and then write regression tests after. Though, haven't tried this approach yet.
It's been very pleasant, and allowed me to make good sense of what I was doing and where I was going.
That means you have to study the old code, which is of course poorly documented and probably buggy; and then try to reproduce it in a sane way.
- https://github.com/ruby/ruby.wasm (compile Ruby to WASM)
- https://mame.github.io/emruby/ (example of Ruby compiled to WASM)
- https://opalrb.com/ (compile a subset of Ruby to JS)
This requires downloading several MB of code (and then caching it in-browser) so would be ideal for internal-only stuff.
I guess perhaps you are working with some very obfuscated code, still if you are black box profiling code it might make sense to crack open that box as much as possible. Unless what you are working with is DRM-level "performs like cow dung in a blender" horrifically inefficient, I can't imagine it is obfuscated that badly.
At any rate, hopefully you are paid well for it, reverse engineering is difficult, to say the least.
I decompiled the app, documented the UI and which variable is what. Rewrote the whole app. It was quite painful but good learning experience. I would love to do another one.
1: https://tom.preston-werner.com/2010/08/23/readme-driven-deve...
Actually implementing something is left to the final 30% of a project. One must first bore themselves to death with design and documentation before a single line of code is written.
I'm incredibly impressed with programmers that can visualize a large program and the end product actually resembles what they originally envisioned. That is a gift.
1. In linux
2. Install wine 7.5 (other versions may work, this is what I used)
3. Create a 32-bit wineprefix on a *case-insensitive* ext4 drive (https://www.collabora.com/news-and-blog/blog/2020/08/27/usin...)
4. Download MSVC 2.0 (https://winworldpc.com/product/visual-c/2x), extract and install it into the 32-bit wineprefix - Make sure you use `wine32 winecfg` and set the OS to Windows 95
5. Copy the files to C:\3d inside the wineprefix
6. Enter command prompt from wine (`wine32 cmd`)
7. `set include=C:\MSVC20\INC`
8. `.\setvars.bat`
9. `nmake`
Unfortunately wine segfaults for me when compiling one of the BRender files :'(
EDIT: Now I have Bren and Engine building! Studio does not build, reports that it doesn't know how to generate 'C:\3d\kauai\obj\wins\utilglob.obj'. Probably something simple...
Just create a disk image and mkfs.ext4 it :)
mkdir -p ~/wine/prefix
truncate -s 10G ~/wine/wine.img
mkfs.ext4 -flags -foo -bar ~/wine/wine.imgArgonaut rang a bell, and sure enough - Jez developed Starglider, one of my all time favourite games on the Amiga.
I can still remember it today, nearly four decades later: It was the first time I visited a new friend, who was the first in our neighbourhood to get the Amiga. He fired up Starglider- and I was simply blown away.
My C64 didn't cut it anymore - I just had to get the Amiga. An involvement in the Norwegian demo scene followed. This later had a big impact on my career as a SWE; thanks very much for this, Jez, if you're here!
But wireframe only, I think?
I think Starglider 2 was inspired in part by Zarch on the Archimedes, and the free Lander demo that came with every Archie.
https://www.youtube.com/watch?v=mFwpsb75omg
It is hard to put into words how amazing it was to see this running, live and playable, on a home computer in 1987.
Jez San also co-designed the SuperFX 3D accelerator chip in the SNES game Starfox. That evolved into the ARC RISC CPU family.
An ARC core was the Intel Management Engine chip in Intel CPUs before they switched to an x86 ME controller running Minix 3.
https://en.wikipedia.org/wiki/Intel_Management_Engine#Hardwa...
And that ARC core ran ThreadX, which is the same OS that runs on the GPU of every Raspberry Pi.
https://en.wikipedia.org/wiki/ThreadX
San offered me a job once, nearly 30Y ago. I should have accepted it. :-D
we used the opposite approach to design the Super FX chip (we called it the Mario chip - likely the first ever gpu)
Carl & Pete would write code to do 3d math and render polygons... and write and re-write the code hundreds of times, using an imaginary assembler language. they would invent new instructions on the fly to let their code get tighter. they would keep coming up with new instructions, new registers, new ways of forming instructions and referencing registers etc... until the code was the tightest... and THEN, we designed a microprocessor from scratch to execute those instructions.
Also, likely the opposite way that microprocessors were designed... because (in the past) the designers had no idea what their cpus were going to be used for, whereas we knew what we wanted to achieve, so got to use software to drive the hardware design.
this was the first time that a cpu was able to be designed using programmable gate arrays. literally Ben & Rob could make a change to the hardware design - the netlist, and email it off to the usa, and actel would Fedex back the next day a working chip for us to try out. this was before you could program your own fpga's yourself (and Xilinx at the time wasn't large enough to fit a whole microprocessor). this iterative approach allowed us to design the optimum 'gpu' for the task.
(And how did Nintendo find a company in the UK to work with considering the language barriers?)
btw, the arc core got used in lots of things that you never hear about... like in Sandisk memory cards (no relation), and various set top box chips (mpeg etc), and wifi chips (at the time, most intel wifi chips used arc)
Even my (younger) brother remembered Starglider well; he's also gone on to do well for himself with a leading role in IT administration in the health sector.
we thought that if we built a trustless casino technology that used smart contracts to power the games and generate provably fair random numbers so that no customer would ever have to play an unfair game.. and that no funds had to be held in the custody of the casino... that there'd be a market for that. we wuz wrong. the market doesn't seem to care about something that's non-custodial or guaranteed fair. we shuttered it about 18 months ago.
so we've pivoted. we're experimenting with NFTs, and driving games. And investing in other worthy projects.
I'd love to see classic Notepad and MS Paint too.
But the most important part of notepad was the editing component, which was a standard win32 component, and wasn’t part of the leak. It’s also unlikely they’ll release it since it’s part of current windows.
They're already out there as source code leaks, but it would be nice to be able to view it legally and perhaps more completely, in a similar way to how we can view the .NET reference source.
I really enjoyed browsing the NT4 and 2000 leaks, it was fascinating to see how Windows works under the hood, and I was interested to see how well (or not) my understanding of the disassembly matched up with where it came from. It also helped massively with troubleshooting and understanding API surfaces, particularly the kernel side.
Could this ever happen, is there the political will internally to be even more open on the OS side?
Thanks for your work on open sourcing awesome old Microsoft stuff!
I should see if I still have my CDs for it somewhere so I can run it in a VM.
I think there's a viscerally satisfying feeling you get when making something that you just don't get when you're playing someone else's game. 3DMM might have had 1% of the budget of a modern Call of Duty game, but I'll remember the time I spent playing 3DMM substantially more.
Seriously. It'll likely both take a little while, yet be usable much sooner than you expect.
There is a community still going around this where people post there movies and stuff - https://www.3dmm.com/
Oh wow, good times!
I then attempted to make a technically complex movie myself, and of course my HDD crashed - seems as a kid I could never catch a break when it came to technology :P
hope they will every release the good old Basic Compiler bascom/basrun stuff
> The infamous Comic Sans font also made its first appearance in 3D Movie Maker
"Comic Sans was designed by Vincent Connare to fit the theme of Microsoft Bob and was inspired by comics like Watchmen and Batman. It would have fit Bob’s animated interface, but it wasn’t completed in time for the release. Given the short lifespan of Bob, we’d never learn to use Windows in Comic Sans. The font did get included in later Microsoft programs starting with Microsoft 3D Movie Maker."
From https://uxdesign.cc/the-ugly-history-of-comic-sans-bd5d07f8c...
I feel like it's almost a shame that it has been deemed as "unprofessional", I think largely because of people using it in places that it doesn't really fit (e.g. the aforementioned research papers). I think there exists an alternate universe where people appreciate Comic Sans for the treasure that it is, and I suppose I can thank both MS Bob and 3DMM for it :).
You can be "productive" with 3DMM in a matter of minutes, vs the few hours it takes for Godot. Of course, Godot is infinitely more capable than 3DMM, so it's sort of apples and oranges.
This org chart is as accurate as it was in 2011:
https://www.cultofmac.com/102917/apple-ms-google-etc-imagine...
One group is moving forward and another one is putting ads in the OS...
- https://youtu.be/PGJKeESLBpQ
- https://youtu.be/X0pEBE_eYdU
- https://youtu.be/H8Nbd4yO1qw (this is a reup from 2009)
- https://youtu.be/VqqRRWIYiy8?t=16
Actually there is an entire playlist you can enjoy:
https://www.youtube.com/playlist?list=PL_7_xaiHt-pegi1SwC1tV...
A random aside. Note on the videos from 2006/7, you've got comments from the last year joking that the authors are time-travelers spreading Gen-Z humor to the past.
https://archive.org/details/nick3dmoviemaker
https://nickelodeon.fandom.com/wiki/Nickelodeon_3D_Movie_Mak...
They already did great jobs with expanding the tools via RE but I wonder if anyone will start adding new features.
Other goals, as far as I remember, are removing limitations on number of objects etc., the ability to export in a modern video format, and different resolutions.
Primary Author : *** Review Status: Reviewed
I wonder what was their process for version control and code review back in the day?
There are surprising few files but those that are here are massive.
https://www.youtube.com/watch?v=gqXTzlDZmhU
see comments on youtube
Like, what in the world is cd12, cd2, cd3, cd9? Somehow it gets worse when you click into them.
Having worked on code thats at least 20 years older than me, by the far the hardest parts to work out are the func1, func2, func3.
Unfortunate given Microsoft's track record of maintaining backwards compatibility
The important thing is it's a starting point. foone specifically indicated a desire to update and extend the software, which means at minimum, a fork that runs on modern platforms.