(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=37967936

然而,关于 FPGA 中双时钟的使用,它可以通过在多个活动可以同时发生的周期期间为读写操作提供额外的时序选项,来提高某些组件(特别是高速缓存或存储器)的效率和操作。 通过在 FPGA 内实现更精确的时序控制,开发人员或许能够实现更快的缓存读取和写入,从而减少延迟并提高整体系统性能。 然而,这种技术可能需要仔细的设计和测试,以确保适当的功能和正确性。 至于 PS2,虽然许多团队正在研究为游戏目的创建仿真或硬件和软件实现的可能性,但目前还没有可公开访问的开源软件或固件供家庭酿造或研究环境之外使用。 同样,尽管正在进行开发项目,但不存在正式许可或批准的实施。

相关文章

原文
Hacker News new | past | comments | ask | show | jobs | submit login
FPGA N64 (ultrafp64.com)
393 points by AndrewDucker 1 day ago | hide | past | favorite | 77 comments










If anyone is interested in new projects for N64 hardware, Kaze Emanuar has an amazing series about optimizing Super Mario 64 to run incredibly complex romhacks on original hardware.

Interestingly, SM64 is usually throttled by memory speed. This means that using 'inline' is detrimental to performance, since making the program larger can cause another read from memory.

Here's an overview video, he has many more specific videos about specific topics:

https://youtu.be/t_rzYnXEQlE?si=6yNnsTxOr7M5v4ub



Romhacks are typically modifying the compiled binary ROM image. Kaze' work is based on the painstakingly disassembled code from the n64decomp project[1]. He's working in C, modifying the game and compiling it again for the original hardware. Not sure I'd call that a "romhack".

Great videos though!

[1] https://github.com/n64decomp/sm64



From a player's perspective, I do think they tend to be called romhacks if they are based on an existing game, although I agree that's selling the project short as it's based on the decompiled source with heavy changes made.

It's sort of been a smooth transition from literal ROM hacks, to hacks with custom assembly, to hacks that are compiled from source, but the name has stuck.



Developers for Nintendo consoles have been using C the whole time, even moreso after the SNES. I can't imagine how long it would take to make a N64 game if I had to do it all in assembly.


A decompilation of Super Mario 64 was only completed a few years ago; before that romhackers were indeed using assembly. The homebrew scene makes fully original games from scratch in C, but romhacks are alterations of existing games (although decomp blurs the lines between the two communities).


I highly doubt there was a readily available C compiler for the 6502 in the 1980s. In any case the idea that developers were widely using C pre N64 is bull. Even in the SNES era it was the minority.


I believe Hudson had a C compiler back then... if not, go check out a hexdump of some Koei games (Nobunaga's Ambition 2 comes to mind), you'll see text strings with the %s token... pretty sure those would only come from C.


So a handful of non graphically intense RPGs from a relatively obscure/cult publisher doesn't really contradict minority though. That particular game was released in early 1990, relatively late into the life of the NES and not exactly a first party title. By 80s, I meant more coincident with the release of the system.

> you'll see text strings with the %s token... pretty sure those would only come from C.

There is nothing inherent in % escaped substitutions that unequivocally implies C. You could pretty easily write an asm port of a basic printf function if one wanted to reuse previously translated strings. Not saying C wasn't used for the NES port of this title, but this by itself isn't as strong a clue as implied.



> You could pretty easily write an asm port of a basic printf function if one wanted to reuse previously translated strings.

In fact, the function for printf used to be implemented in assembly on Unix. In this link, the actual implementation is in doprnt.s, and the function printf (in printf.c) just passes its arguments to the function _doprnt. In V6 Unix, it was the same for scanf, but V7 seems to have replaced it with a C implementation.

http://tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc/stdio



> Developers for Nintendo consoles have been using C the whole time

It was only done with assembly on the NES.



So rust should solve all their problems right?


> new projects for N64 hardware

There's an entire community doing N64 homebrew: https://n64brew.dev/wiki/Main_Page , including a faction who are working on a Rust SDK (basic demo: https://youtu.be/XmlmvRrRFqs).



I know a lot less about the homebrew community but it's also very cool! Do you know of a big project that would be an interesting entry point for getting into the community?


AFAIK most homebrew games tend to be the product of lone developers, rather than large collaborative efforts. I could be wrong though; there's a Discord linked on the wiki that you could ask in for ideas.


I love what he did, but it seems like his recent stuff is only running his romhack. Did he ever make a build of the original Mario 64 with all his peformance fixes, so the original game content can run at 60 FPS on a real N64?


No, and he made a video about it. Basically he worked on the optimizations together with his modifications. He should've done a separate branch on the codebase with only optimizations on the original code


He says he'll port his performance optimizations to the original game once he's done with his game / romhack. Otherwise he'd have to always update two codebases when he finds a new optimization.


For the thousands of people in the MiSTer FPGA ecosystem, some of whom bought the hardware [0] as long ago as 2020, for well under $200 (it's more, now [1]), a featureful FPGA N64 core - developed by Robert Peip, who is paid, most would say very deservedly, thousands per month via P_treon) - will be coming soon as a free update, once the already very advanced work is complete. The betas are playable now, and there are near daily updates.

[0] https://mister-devel.github.io/MkDocs_MiSTer/setup/requireme...

[1] https://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=...



Why did you censor "P_treon"? Or are "a" and "_" close on your keyboard?


No great reason, other than a vague unease at the tacit promotion (to people, and/or to future spiders/bots) involved in citing the name of a specific corporate - it being a largely irrelevant side element of the greater point I was here to make.


I never got a MiSTer but I was always vaguely interested. Has the hardware been updated in all that time? Or is an updated one likely in the future?


There have been a few minor revisions of some of the optional add on boards and things like SNAC adaptors for using original controllers from different systems.

There have also been a few different takes on making a mister in more of a console form factor, and boards that integrate into arcade cabinets or fit in ITX PC cases.

The software has come a hell of a long way. In the army days, the most advanced cores were 8 bit systems like the NES. Now we’ve got PlayStation 1, Sega Saturn and N64 in the works. Similar progress has been made supporting old computer and arcade systems too.

There is an upcoming sort of successor called Marsfpga that’s recently started being teased. From the little that’s been shared so far, the community seems hopeful that this will mean the Dreamcast and support for arcade games through the early 2000s are possibilities.

Once you get much beyond that era, an FPGA-based approach makes less sense - the systems become much, much more complex and also largely standardise around with x86 or ARM where there are always to run them without emulation at all. A notable exception to that is the PS3 with its cell architecture. Then again, people said for a long time that PS1 and Saturn were not possible.



They still use the de10 board as the base but there's been improvements to the io boards and memory support. Faster/higher density memory is what has allowed for the more modern systems to be supported.

There's a project called marsfpga that will support newer hardware.



The MiSTer, which imo is still by far the best bang-for-buck system of it's type either on the market now, or likely to hit the market anytime soon, is still based upon the original hardware. Several peripherals and form factors have been added or updated as options, but the central processors are the same.

Software updates are a different matter entirely. The system has evolved greatly, with each year so far having resulted in an impressive list of new additions and improvements.

The cogs and wheels of the niche entrepreneur industry have been slowly turning, and the next 1 - 5 years promises several likely newer generation products. People highly invested in some of the 32- and 64- bit systems not covered by MiSTer, and or people who want more modern display options, will be very interested in those. The price projections seem to be aiming at the $500-$1000 range.

But as of today it's still hard to look past the MiSTer, as a multi-year already proven system, which has for years offered elite level 8- and 16- bit recreations, recently added an amazing Playstation 1 core, is close to adding an N64 core, and can be had right now all-inclusive starting in the $300 segment.



There's a good Sega Saturn core in the official Downloader now too.


Related: Analogue have a N64 FPGA clone "coming in 2024" https://www.analogue.co/3d

Not much info on the page, also I'm not in any way affiliated. Just think it's cool that this is getting commercialized.



RobertPeip (FPGAzumSpass, the developer of the Mister PS1 core) also an open source N64 FPGA core in development: https://github.com/RobertPeip/Mister64


Analogue make cool stuff, it's just a shame that their business model seems so strangely focused on enriching scalpers (extremely limited supply and numerous 'limited edition' releases even when the standard model is unobtanium - and most of them end up straight on eBay for silly prices)


I've bought everything they've made, but they don't have great customer support.

The only shipping they do is extremely expensive express shipping internationally. They had some adapters that were previously OOS come available, but the Pocket system was OOS. I emailed them, asking them if I could buy the adapters, have them put them aside, and reserve the Pocket, and have them ship it all at once whenever the Pocket was in stock. I even offered to pay it all up front so they weren't put out. They basically (politely) told me to suck it up, and buy both, and pay ~ 100 AUD each time to ship them express, separately.



Similarly they offer very little support, almost no communication, and yeah, just kind of weird.


Either they're their own resellers and don't want to change, or they can't get enough FPGA cores so they turn to silliness to market their very limited inventory.


They’re a really small company and lean heavily on their sibling company 8bitdo for some bits. Getting the FPGAs is the problem generally, and the same reason why it’s hard to find a mister. They usually similar chips too.

The size of the company also explains the support issues.





Really impressing the progress he's made with that MiSTer core, especially since for years people said there was absolutely no way an N64 core could work on the MiSTer's DE10 nano FPGA board.


Ah, so this is the same as the Mister core? I thought it was a different codebase from the Mister core as I couldn’t see any mention of Mister, DE-10 or Nano on the page, so blindly assumed it was developed for a much larger FPGA (making my earlier comment below redundant).


No. The GitHub link is to Mister64. Which is an impressive WIP, but is not related to the main article linked here.

I'm most excited for the next generation of FPGA retro consoles coming in the next 6ish months. Specifically the MARSFPGA. All the existing Mister cores, plus a bunch of new stuff enabled by a better and newer FPGA. The estimated price is $700, that's reasonable for those of us with large disposable income that want the retro kit with no hassle, easy access for the kids, and high Wife Acceptance Factor.

I'm also looking forward to all the upcoming arcade cores for the MARSFPGA.



it's much more about the community knowing for sure that something was impossible while also not knowing what they were talking about. each person said it was impossible because they read someone else say it was impossible, which itself started way back early in the project when someone said that any 3D console would be impossible.

this was obviously always possible, but it required someone who wasn't indoctrinated into the community. the community behind a project is always both the very best and very worst thing about any project.



It doesn't mention the FPGA platform used for this so I did a bit of digging. Looks like Digilent's "Nexys Video Artix-7 FPGA: Trainer Board for Multimedia Applications". This goes for $550 and of course doesn't count all of the PMOD's and other hardware hanging off the board.

https://digilent.com/shop/nexys-video-artix-7-fpga-trainer-b...



What is this? Besides apparently a hardware compatability... thingy.. for N64?


Hardware emulation for an N64 with HDMI out


That's the million dollar question for so many hardware and software projects where the information is linked to some page that says nothing about what it is or what it does including the github link to its creator here.


I haven't been following the scene too closely, but there's been a huge ecosystem of fpga clones of 90s video game consoles in the last few years. The "mister" project is one such endeavor.

The market for the original hardware, old cartridges and mods for things like better video signals or Bluetooth controllers is also popping.



Looks like the most recent youtube video was 3 years ago, and the most recent twitch stream was 2 years ago. Anyone know the actual current status of this?


Maybe he was hired for this: https://www.analogue.co/3d

The timeline matches, 2 years between hire and announcement.

Discussed a few days ago: https://news.ycombinator.com/item?id=37901025



Related, any recommendations on low-cost ways to start playing around with FPGAs? Boards, chips, projects?


Diligent makes several boards for the educational market, prices in the sub-$200 range. (And the devices are small enough they can be used with the no-cost version of the AMD/Xilinx toolchain.)

https://digilent.com/shop/fpga-boards/development-boards/int...

For online courses, I've heard good things about Nand2Tetris but have not tried it myself.

https://www.nand2tetris.org/



I looked at nand2tetris a while ago briefly and I have the impression that it focuses too much on making complex circuits.

The target audience for nand2tetris are people that want to understand how the CPU works, and nand2tetris focuses too much on how to make logic using nand gates leaving other areas uncovered.

I recommend the Ben Eater youtube chamnel, he has a series of videos about building an 8bit computer, that in my opinion is much more informative for a curious person.



I’ve gone through the nand2tetris course (parts 1 and 2) and I’ve also physically built Ben Eater’s projects.

nand2tetris covers many levels of abstraction; it is both lower and (much) higher level than Ben Eater’s projects, which is one of its main points: you can create something in one level of abstraction and then build on it in the next level of abstraction. It only starts with logic gates (a single one to start with, “nand” obviously) and goes through the other logic gates that can be built from nand gates, then various digital logic built on that, registers and other synchronous logic, ALU, full CPU, full computer. Hardware is only the first half of the course. Then you build a stack machine, assembler, objected oriented language compiler, a software library I think, and finally a game you write in that (doesn’t have to be Tetris). So the whole second half is layer on layer of software abstractions starting from the hardware. I would say it handwaves over video output and keyboard input because it’s not what they’re teaching about, while Ben Eater shows how to physically build such things.

Ben’s is purely hardware up through 2 main registers, an alu with only add and subtract, an 8 bit digital readout, no real input (besides updating RAM to input the code & data using switches), 16 bytes of RAM (4-bit address), and control unit to implement machine language with a few opcodes. His 6502 project starts with a CPU which is already far beyond where the 8-bit computer ends and builds a computer architecture around it (RAM, ROM, I/O, and peripherals: video, keyboard, serial).

nand2tetris is normally simulated and Ben’s covers physically building things which has its own set of lessons/skills to learn. Coincidentally I ran across a crossover of the two projects today: a video of someone who built a breadboard version of the nand2tetris 16-bit cpu (called Hack)! https://youtu.be/L-azf9ecvfo



I like the iCEBreaker board, relatively cheap (80 euro), uses the digilent Pmod interface for add-on boards and the Lattice FPGA works well with OSS tooling (Yosys, Icestorm, ... for me this is a deal-breaker as I hate the proprietary IDEs).

Here are some project tutorials for it (should be easy to adapt to other hardware too):

https://github.com/icebreaker-fpga/icebreaker-workshop https://github.com/icebreaker-fpga/WTFpga



There's a ton of of dev boards out there, but I would say to be sure to get something with hardware buttons and LEDs, as it really helps with some of the Hello World level of things, and many of the cheapest options won't have those.

I started messing with FPGAs with the DE0-Nano, but eventually got so frustrated with the tiny buttons that I upgraded to a DE0-CV, which I really enjoyed my time with. It has some 7 segment LEDs, physical switches, and buttons, and it also has a VGA port, PS/2 port, and Micro SD card slot, so you can build a pretty snazzy little PC if you want to.



Altera MAX 10 evaluation board is probably one of the cheapest options. You use quartus prime lite to configure it which is free, and better than the equivalent Lattice tools.


You might be interested in this new book: https://nostarch.com/gettingstartedwithfpgas


educational developer kits https://www.intel.com/content/www/us/en/developer/articles/t...

there are a few different major brands



orange crab another option


I wonder if we're going to hit a wall on cycle-accurate software emulation; Higan is pretty cool, but even that requires a fairly beefy CPU considering it's emulating something reasonably primitive like the SNES.

I know nothing about electronics, but the recent uptick in FPGA game systems like the MiSTer getting Playstation and N64 support, I am hoping that FPGAs can pick up where Higan left off; it would be great to get cycle-accurate emulation of the Xbox 360 some day since I never fixed mine after getting a red ring.



Cycle-accurate software emulation is a topic that I've been looking into on and off for years.

The Higan concurrency architecture hit a wall because it needs to sync between modules every single cycle, what gets very expensive as the clock rates go up.

But you don't need to sync every single cycle, especially once CPUs started getting caches, so we just need a new concurrency architecture that's flexible enough to only sync when needed.

I've been experimenting with an actor based concurrency model which seems to be fast enough for a cycle-accurate N64 emulator (though I won't know until I have the RSP and RDP implemented). I'm hoping it might even be fast enough for 6th gen consoles, perhaps when combined with other techniques like a cycle-accurate jit and fine-grained memory locks.

I'll have to post an article if it ever gets to a workable state.

------

As for cycle-accurate FPGA emulators, I don't think they are cost-effective even for something like the N64, yet alone a 360. You can get 90% of the way there with a cycle accurate CPU, shared bus, cycle accurate RSP/RDP. But you have to map the RDRAM onto DDR3 memory and the timings don't really line up. The linked UltraFP64 project doesn't even try for accurate RAM timings and will preform better than a real N64. I suspect the WIP n64 core for MiSTer is much the same.

You could build a custom board with memory that actually matches the timings, but that gets expensive.



I do not believe it is possible to run an Xbox 360 game without copyrighted code from Microsoft. So we might see it from projects just like this one, but I wouldn't hold my breath for Analogue to ever release anything past the PS2.


Conceivably we could get some kind of Wine/ReactOS thing couldn't we? Something that recreates the APIs well enough to play most games?

That said, I acknowledge that that would take a lot more work, and it might not be economically worth it for Analogue or the MiSTer people to bother with it.



That's some plumbing even Mario and Luigi would be impressed by.


Is there any wrapper for mister cores that allows them to work on a PCIe FPGA card? It would be cool to have an N64 inside my PC.


That is quite an achievement! It extends the range of fully realizable game consoles that are realizable in inexpensive FPGAs. At one time I saw a web article on FPGA versions of arcade game architectures (looking it up it seems that became the 'mistercade' project for JAMMA compliant cabinets). I'm always amazed at the creativity here, both in the original designer's part and in recreator's part of reproducing that same vision.


Looks like great work! I feel it’s worth mentioning that there is also an N64 core for MisterFPGA now - https://misterfpga.org/viewtopic.php?t=6947


I see a donation button, but not a link to the source code.

Not sure this thing is open source hardware, or available to anyone in any form, or even real.



The project UltraFP64 will be released as Analogue 3D only.


Source?


It looks incredible, great amount of work invested into it.


Wow, just wow! For me, these guys are god's!


HN has hugged it too hard. archive mirror link: https://web.archive.org/web/*/http://www.ultrafp64.com




> Cache memory with duel clocks

:) Just a nitpick, don't mind me. This is a neat project

Dual = There are two clocks

Dueling = The clocks are swinging swords at each other



each clock has 2 swords wielded in their 'hands' ?


Shaving time off my development estimates hoping for sunshine.


Perpetually slashing each other in turn. To keep that cache fresh? To “cut down” on cache size? To conquer cache daemons?


A dual wielding duel?


(Obligatory “is this website hosted on the N64?” joke)


Take that Sony!

(The PS2 is also implemented on a FPGA. Idk whether the PS1 is or isn't though)



The PS2 is not implemented on an FPGA. There might have been some internal dev hardware with some FPGAs, but nothing released.






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



Search:
联系我们 contact @ memedata.com