Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Digital Logic Sim

​A minimalistic digital logic simulator · By Sebastian Lague

Simulation Freezing when using ROM chips

A topic by AbleSundew74444 created 49 days ago Views: 148 Replies: 7
Viewing posts 1 to 8

So I've been trying to make a program that requires a lot of storage, so I create some modules each with 16 ROM chips. I then intend to access items at the different addresses. When testing within each module it works fine, but after testing it in a chip with multiple modules, it works fine until the address I try to access is higher than or equal to 198; then the simulation freezes. I am able to interact with everything, but nothing updates despite the preferences page displaying it is still doing 1000 steps a second. Switching to another chip with nothing in it doesn't fix the problem. The problem only resolves when I exit to the main menu as if the simulation was in an infinite loop. I didn't notice my computer lagging or anything so I was wondering if anyone had any suggestions on getting around it.

Here are some photos showing the problem

did you press ctrl+space? That pauses the sim

No, I didn't press ctrl space and I checked that the sim wasn't paused

probibly a thing to do with howmany changes it has to handle at once and it hangs during the change

(1 edit)

Does a disconnected wire update chips, because I have the three state chip inside of the chip but I can move it to be outside the chip so they aren't updating a ton

(1 edit)

idk it could work but i have a 128kb rom and it works just fine but my diffrence is i have the parts mostly on the same layer other than the decoders and the tristates. oh and sorry for the late reply

After putting the three state chips on the outside it stopped freezing at 198, it now stops at 254, but I think I can fix it with a pulse to make half of it update and then the other half at the next simulation tick. Also, if the simulation is in a different thread then it may be that it is hitting a stack overflow error and that is why it is freezing while the rest of the application remains fine. Also no worries with the late reply, it's all good