-struct dcpu16_hw *spc2000_new(struct dcpu16 *vm) {
- struct dcpu16_hw *hw;
-
- hw = calloc(1, sizeof *hw);
- if (hw == NULL) {
- vm->warn_cb_("%s():%s", "calloc", strerror(errno));
- return NULL;
- }
-
- memcpy(hw, &hw_, sizeof *hw);
-
- hw->data = calloc(1, sizeof(struct spc2000_));
- if (hw->data == NULL) {
- vm->warn_cb_("%s():%s", "calloc", strerror(errno));
- free(hw);
- return NULL;
- }
-
- hw->vm = vm;
+struct dcpu16_hw_module dcpu16_hw_module_spc2000 = {
+ .name_ = "SPC2000 - Suspension Chamber 2000",